Skip to content

Commit fac0a48

Browse files
author
Matthias Radestock
committed
merge bug18997 into default
2 parents d868699 + de92be3 commit fac0a48

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,13 @@ public void shutdown(Object reason,
585585
try {
586586
synchronized (this) {
587587
ensureIsOpen(); // invariant: we should never be shut down more than once per instance
588-
_shutdownCause = new ShutdownSignalException(true,
588+
ShutdownSignalException sse = new ShutdownSignalException(true,
589589
initiatedByApplication,
590590
reason, this);
591+
sse.initCause(cause);
592+
_shutdownCause = sse;
591593
}
592594

593-
if (cause != null) {
594-
_shutdownCause.initCause(cause);
595-
}
596595
_channel0.processShutdownSignal(_shutdownCause);
597596
} catch (AlreadyClosedException ace) {
598597
if (initiatedByApplication)

0 commit comments

Comments
 (0)