morellon/stomp — pull request #31 by ripienaar (2012-03-09 15:51:50+00:00)
Title: Always log connection attempts via on_connecting

Prior to this commit the on_connect logger would only be called on
initialize, not later on during reconnects such as those initiated
during managing a reliable connection:

`on_connecting' Connection attempt 0 to stomp://rip@stomp:6162
`on_connectfail' Connection to stomp://rip@stomp:6162 failed on attempt 0
`on_connected' Conncted to stomp://rip@stomp:6163

Here a 2nd connection attempt was made to the failover connection that
was defined in the pool but never logged

With this commit we now log at each attempt to reconnect the sockets
instead so we get:

`on_connecting' Connection attempt 0 to stomp://rip@stomp:6162
`on_connectfail' Connection to stomp://rip@stomp:6162 failed on attempt 0
`on_connecting' Connection attempt 1 to stomp://rip@stomp:6163
`on_connected' Conncted to stomp://rip@stomp:6163