We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4714361 commit fdf0882Copy full SHA for fdf0882
spec/mqtt/client_spec.rb
@@ -868,6 +868,12 @@ def register_for_ack(packet)
868
client.send(:receive_packet)
869
end
870
871
+ it "closes the socket if there is a system call error" do
872
+ expect(socket).to receive(:close).once
873
+ allow(MQTT::Packet).to receive(:read).and_raise(Errno::ECONNRESET)
874
+ client.send(:receive_packet)
875
+ end
876
+
877
it "passes exceptions up to parent thread" do
878
client.reconnect_limit = 0
879
allow(MQTT::Packet).to receive(:read).and_raise(MQTT::Exception)
0 commit comments