We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a23e88 commit e45f13dCopy full SHA for e45f13d
src/com/rabbitmq/client/impl/AMQConnection.java
@@ -544,9 +544,18 @@ public boolean processControlCommand(Command c)
544
// See the detailed comments in ChannelN.processAsync.
545
546
Method method = c.getMethod();
547
-
+
548
if (method instanceof AMQP.Connection.Close) {
549
- handleConnectionClose(c);
+ if (isOpen()) {
550
+ handleConnectionClose(c);
551
+ } else {
552
+ // Already shutting down, so just send back a CloseOk.
553
+ try {
554
+ _channel0.quiescingTransmit(new AMQImpl.Connection.CloseOk());
555
+ } catch (IOException ioe) {
556
+ Utility.emptyStatement();
557
+ }
558
559
return true;
560
} else {
561
if (isOpen()) {
0 commit comments