File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ public void start()
242
242
243
243
// start the main loop going
244
244
Thread ml = new MainLoop ();
245
- ml .setName ("AMQP Connection " + getAddress (). getHostAddress () + ":" + getPort ());
245
+ ml .setName ("AMQP Connection " + getHostAddress () + ":" + getPort ());
246
246
ml .start ();
247
247
248
248
AMQP .Connection .Start connStart = null ;
@@ -560,7 +560,7 @@ public void handleConnectionClose(Command closeCommand) {
560
560
_brokerInitiatedShutdown = true ;
561
561
Thread scw = new SocketCloseWait (sse );
562
562
scw .setName ("AMQP Connection Closing Monitor " +
563
- getAddress (). getHostAddress () + ":" + getPort ());
563
+ getHostAddress () + ":" + getPort ());
564
564
scw .start ();
565
565
}
566
566
@@ -727,6 +727,10 @@ public void close(int closeCode,
727
727
}
728
728
729
729
@ Override public String toString () {
730
- return "amqp://" + _factory .getUsername () + "@" + getAddress ().getHostAddress () + ":" + getPort () + _virtualHost ;
730
+ return "amqp://" + _factory .getUsername () + "@" + getHostAddress () + ":" + getPort () + _virtualHost ;
731
+ }
732
+
733
+ private String getHostAddress () {
734
+ return getAddress () == null ? null : getAddress ().getHostAddress ();
731
735
}
732
736
}
You can’t perform that action at this time.
0 commit comments