From 478e3bbed93d3b60cd66694adaf6642524b17671 Mon Sep 17 00:00:00 2001 From: Juan Vanecek Date: Fri, 30 Aug 2024 01:41:59 -0300 Subject: [PATCH] Stop heartbeat after socket was closed --- source/Ansible-Protocol-Core/AmqpConnection.class.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Ansible-Protocol-Core/AmqpConnection.class.st b/source/Ansible-Protocol-Core/AmqpConnection.class.st index 22394a8a..b08b36b0 100644 --- a/source/Ansible-Protocol-Core/AmqpConnection.class.st +++ b/source/Ansible-Protocol-Core/AmqpConnection.class.st @@ -50,7 +50,6 @@ AmqpConnection >> becomeCloseAfter: aBlock [ LogRecord emitInfo: ( 'AMQP connection <1s> closed due to <2s>' expandMacrosWith: self connectionPairsDescription with: closingMethod replyText ). - heartbeatSender stop. [ socket close ] on: ExpectedSocketFailure do: [ :error | @@ -58,7 +57,8 @@ AmqpConnection >> becomeCloseAfter: aBlock [ will raise a SocketError that we want to silence " error return ]. isOpen := false. - socketConnectionStatus := ClosedSocketConnection dueTo: closingMethod replyText + socketConnectionStatus := ClosedSocketConnection dueTo: closingMethod replyText. + heartbeatSender stop. ] ] ]