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.
2 parents dc88e27 + 6903f4e commit 5393e4fCopy full SHA for 5393e4f
src/com/rabbitmq/client/impl/AMQConnection.java
@@ -528,9 +528,18 @@ public boolean processControlCommand(Command c)
528
// See the detailed comments in ChannelN.processAsync.
529
530
Method method = c.getMethod();
531
-
+
532
if (method instanceof AMQP.Connection.Close) {
533
- handleConnectionClose(c);
+ if (isOpen()) {
534
+ handleConnectionClose(c);
535
+ } else {
536
+ // Already shutting down, so just send back a CloseOk.
537
+ try {
538
+ _channel0.quiescingTransmit(new AMQImpl.Connection.CloseOk());
539
+ } catch (IOException ioe) {
540
+ Utility.emptyStatement();
541
+ }
542
543
return true;
544
} else {
545
if (isOpen()) {
0 commit comments