Skip to content

Commit

Permalink
Stop heartbeat after socket was closed
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanecek committed Aug 30, 2024
1 parent 654f411 commit 478e3bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/Ansible-Protocol-Core/AmqpConnection.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ 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 |
" If the socket was unexpectedly closed, trying to close it again
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.
]
]
]
Expand Down

0 comments on commit 478e3bb

Please sign in to comment.