Closed ismith closed 11 years ago
Hi Ian - Thanks for the pull request. However, please post a short example program showing when the infinite loop occurs and it should not.
In particular I need to know what the value of:
:max_reconnect_attempts => ??
In your example program.
The default for that value is 0. The semantics of that is retry forever....... Clients must override that to control (lower) the maximum number of retries.
In the absence of a convincing example, I am inclined to not merge this.
Thanks and Regards, Guy
In our case (@ismith and I are colleagues) we have set :max_reconnect_attempts => 3
in our Stomp::Client
configuration
Well, I will ponder how to recreate this.
Please show me your:
cli = Stomp::Client.new(.....)
https://gist.github.com/ismith/6109518
The above recreates it; kill activemq after the first message-published output, and it will try to reconnect N>2 times. (Eventually failing on Stomp::Error::NoCurrentConnection)
Whereas, running the same test using the pull request above should only try to reconnect twice, then give up. (It will still eventually fail on NoCurrentConnection, that's expected behavior.)
Thanks. So .... give me more pull requests.
Work on 'dev' please.
So .... give me more pull requests.
@gmallard This pull request should resolve the issue in question; was there other behavior you feel is related to this issue? (If not, can you bump the version and release to rubygems?)
Ian - As far as a version bump, I am going to work on one other issue before I do that. In the mean time I suggest you build locally from the current master's HEAD.
Version bump done, on rubygems.
Fix for: https://github.com/stompgem/stomp/issues/61