File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/com/rabbitmq/client/impl Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,10 @@ public void start(boolean insist)
226226 _frameHandler .setTimeout (HANDSHAKE_TIMEOUT );
227227 _frameHandler .sendHeader ();
228228
229- new MainLoop ().start (); // start the main loop going
229+ // start the main loop going
230+ Thread ml = new MainLoop ();
231+ ml .setName ("AMQP Connection " + getHost () + ":" + getPort ());
232+ ml .start ();
230233
231234 try {
232235 // See bug 17389. The MainLoop could have shut down already in
@@ -548,15 +551,17 @@ public void handleConnectionClose(Command closeCommand) {
548551 }
549552 _heartbeat = 0 ; // Do not try to send heartbeats after CloseOk
550553 _brokerInitiatedShutdown = true ;
551- new SocketCloseWait (sse );
554+ Thread scw = new SocketCloseWait (sse );
555+ scw .setName ("AMQP Connection Closing Monitor " +
556+ getHost () + ":" + getPort ());
557+ scw .start ();
552558 }
553559
554560 private class SocketCloseWait extends Thread {
555561 private ShutdownSignalException cause ;
556562
557563 public SocketCloseWait (ShutdownSignalException sse ) {
558564 cause = sse ;
559- start ();
560565 }
561566
562567 @ Override public void run () {
You can’t perform that action at this time.
0 commit comments