Skip to content

Commit

Permalink
Improve AmqpConnection description
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanecek committed Aug 27, 2024
1 parent aba0408 commit 15a7575
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions source/Ansible-Protocol-Core/AmqpConnection.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand Down Expand Up @@ -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 [

Expand Down

0 comments on commit 15a7575

Please sign in to comment.