-
Notifications
You must be signed in to change notification settings - Fork 136
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
Thread termination with exception not handled? #142
Comments
Hello! I don't want to globally set My fix for now is something like this:
|
@JakubSzajna but ruby-mqtt has this definition: mqtt.rb#L23 module MQTT
...
# Super-class for other MQTT related exceptions
class Exception < ::Exception
end
...
end Used here: mqtt/client.rb#L476 # Pass exceptions up to parent thread
rescue Exception => exp
unless @socket.nil?
@socket.close
@socket = nil
handle_close
end
Thread.current[:parent].raise(exp)
end Is |
@phlegx Yes, it does have this definition and it branches out from stdlib
The monkey-patch from my message wraps the whole |
@JakubSzajna can you write a PR please? |
Found similar PR #112 related to StandardError. |
I don't think this fixes the issue were talking about here. If I find some time, I'll create a PR to include a proposed solution in the gems code. |
any hope for this PR? |
With this simple implementation, I get an exception after broker goes down for some reason.
Here the log:
How can I rescue from this exception?
The text was updated successfully, but these errors were encountered: