diff --git a/source/Ansible-Protocol-Core/AmqpConnection.class.st b/source/Ansible-Protocol-Core/AmqpConnection.class.st index 3e3634f9..b3036420 100644 --- a/source/Ansible-Protocol-Core/AmqpConnection.class.st +++ b/source/Ansible-Protocol-Core/AmqpConnection.class.st @@ -95,10 +95,10 @@ AmqpConnection >> codec [ { #category : 'accessing' } AmqpConnection >> connectionPairsDescription [ - ^ 'localhost:<1p>-><2s>:<3p>' - expandMacrosWith: ([socket port] on: SocketError do: [ :error | error return: 0 ]) - with: hostname - with: portNumber + ^ 'localhost:<1p>-><2s>:<3p>' + expandMacrosWith: self localPortDescription + with: hostname + with: portNumber ] { #category : 'connection-handling' } @@ -220,6 +220,12 @@ AmqpConnection >> installChannel0 [ channel mapEvent: self protocolClass connectionCloseMethod to: self selector: #handleConnectionClose: ] +{ #category : 'accessing' } +AmqpConnection >> localPortDescription [ + + ^ socket isConnected then: [ socket localPort ] otherwise: [ 0 ] +] + { #category : 'connection-handling' } AmqpConnection >> mainLoopCycle [