Skip to content

Commit 1d13f2f

Browse files
author
Matthew Sackman
committed
Don't abuse setHeartbeat(0) for actually stopping the heartbeater
1 parent e93ea3e commit 1d13f2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ public void handleConnectionClose(Command closeCommand) {
541541
} catch (IOException ioe) {
542542
Utility.emptyStatement();
543543
}
544-
setHeartbeat(0); // Do not try to send heartbeats after CloseOk
544+
_heartbeatSender.shutdown(); // Do not try to send heartbeats after CloseOk
545545
_brokerInitiatedShutdown = true;
546546
Thread scw = new SocketCloseWait(sse);
547547
scw.setName("AMQP Connection Closing Monitor " +

0 commit comments

Comments
 (0)