eclipse-paho / eclipse-paho/paho.mqtt.python
OSError have no include TimeoutError?
- Dominant language
- Python
- Stars
- 2.4k
- Forks
- 742
- Avg merge
- 12d 48m
- Merged PRs (30d)
- 1
Description
I found this error⬇️
```bash
Exception in thread Thread-1 (_thread_main):
Traceback (most recent call last):
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/opt/homebrew/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/opt/homebrew/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/opt/homebrew/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/opt/homebrew/lib/python3.10/site-packages/paho/mqtt/client.py", line 2370, in _packet_read
command = self._sock_recv(1)
File "/opt/homebrew/lib/python3.10/site-packages/paho/mqtt/client.py", line 640, in _sock_recv
return self._sock.recv(bufsize)
TimeoutError: [Errno 60] Operation timed out
```
and check the code:
```python
class ConnectionError(OSError): ...
```
**Looks fine, But it is none.
So I add this code:**
**It works.**

This is not the same as described in the previous issue #291 and #288 , why?
Contributor guide
Assessment
This issue has not been assessed yet.