-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Description
With this simple implementation, I get an exception after broker goes down for some reason.
client.subscribe('test' => 0)
client.get do |topic, message|
# Block is executed for every message received
end
Here the log:
/usr/local/bundle/bundler/gems/ruby-mqtt/lib/mqtt/packet.rb:222:in `getbyte': Connection reset by peer @ io_fillbuf - fd:5 (Errno::ECONNRESET)
from /usr/local/bundle/bundler/gems/ruby-mqtt/lib/mqtt/packet.rb:222:in `read_byte'
from /usr/local/bundle/bundler/gems/ruby-mqtt/lib/mqtt/packet.rb:30:in `read'
from /usr/local/bundle/bundler/gems/ruby-mqtt/lib/mqtt/client.rb:466:in `receive_packet'
from /usr/local/bundle/bundler/gems/ruby-mqtt/lib/mqtt/client.rb:273:in `block in connect'
How can I rescue from this exception?
RKushnir and Toucouleur66
Metadata
Metadata
Assignees
Labels
No labels