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()
242242
243243 // start the main loop going
244244 Thread ml = new MainLoop ();
245- ml .setName ("AMQP Connection " + getAddress (). getHostAddress () + ":" + getPort ());
245+ ml .setName ("AMQP Connection " + getHostAddress () + ":" + getPort ());
246246 ml .start ();
247247
248248 AMQP .Connection .Start connStart = null ;
@@ -560,7 +560,7 @@ public void handleConnectionClose(Command closeCommand) {
560560 _brokerInitiatedShutdown = true ;
561561 Thread scw = new SocketCloseWait (sse );
562562 scw .setName ("AMQP Connection Closing Monitor " +
563- getAddress (). getHostAddress () + ":" + getPort ());
563+ getHostAddress () + ":" + getPort ());
564564 scw .start ();
565565 }
566566
@@ -727,6 +727,10 @@ public void close(int closeCode,
727727 }
728728
729729 @ 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 ();
731735 }
732736}
You can’t perform that action at this time.
0 commit comments