-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to test if connection is currently failing? #47
Comments
Please show me your call to Client#new or Client#open. Right now, I do not think you are doing anything wrong....... Regards. |
Do you have a small example program that displays this behavior? If so, please post it here. Thanks. |
You are making the argument that the instance variable @closed should be set to true during retries for a failing connection, and then set to false again when a reconnect occurs. I agree. Accepted. It is a one line code change, and will be in the next release. Regards, Guy |
Closed: 270512b |
That is it exactly. Thanks for jumping on this so quick! I was gonna try and repro in a unit test on the gem, but had some other stuff come up this morning. Thanks! |
Hello,
I'm needing to implement some logic to occur when our stomp client is unable to connect to our message server.
I was trying to use
client.open?
. This returned true just fine, but when I killed my message server to test the failure condition, it continued to report true, even though 'on_connectfail' log messages were being logged.After checking out the socket method in connection.rb, It looks like I might be able to check
@connection_attempts > 0
but was wondering if there is a better way, or if maybe I'm going about this all wrong...Thanks!
The text was updated successfully, but these errors were encountered: