eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.15k stars 724 forks source link

Added TimeoutError catching for TCP connection #710

Closed samson0v closed 7 months ago

samson0v commented 1 year ago

When you turn off your internet connection and still publish messages after a timeout raises TimeoutError: [Errno 60] Operation timed out

Fixes in this PR catch this error and the client correctly disconnects and closes the socket.

Due to issues #709 and #694

Signed-off-by: Vitalii Bidochka vitalikbidochka@gmail.com

PierreF commented 7 months ago

Thanks for your contribution. I've merged this PR by cherry-picking your first commit (dd229dc, the second commit was for a fix which is now already done on master (75f765701d8e403747f696444fd72e5b4fd80967)