Skip to content

Commit 1ec2daf

Browse files
committed
Merge branch '4.2.x-stable' into 4.3.x-stable
2 parents e288093 + 54299d9 commit 1ec2daf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ public void setUri(URI uri)
226226
// nothing special to do
227227
} else if ("amqps".equals(uri.getScheme().toLowerCase())) {
228228
setPort(DEFAULT_AMQP_OVER_SSL_PORT);
229-
useSslProtocol();
229+
// SSL context not set yet, we use the default one
230+
if (this.sslContext == null) {
231+
useSslProtocol();
232+
}
230233
} else {
231234
throw new IllegalArgumentException("Wrong scheme in AMQP URI: " +
232235
uri.getScheme());

0 commit comments

Comments
 (0)