-
Notifications
You must be signed in to change notification settings - Fork 1k
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
"OSError: -1" if use keepalive>0 #210
Comments
Please try using the latest umqtt library and then provide a minimal reproducible test case that shows the error. |
guess i'll just take over this issue thread ;) when using keepalive>0, server disconnects from client and client raises an exception in given line 171 in wait_msg. So the socket disconnection is being correctly detected. disregard my error description below! (only if you have the same problem and need a solution) now to the original issue: my thoughts on this so far:
Steps to reproduce:
maybe i have a misconfigured server, won't exclude that possibility although it would be rather strange if that is the problem. |
I had same problem with continue disconnecting from the mqtt server with keepalive > 0. If I correct this issue is not an issue it is a feature. If you set keepalive value - you have to send something to mqtt server to inform that you are alive in less time than keepalive value of seconds. |
I'm not sure is it task for mqtt client to keep connection alive in time.
|
that's why I call mqtt.ping() regularly. Together with last will this shows the device state in home-assistant. |
The problem remains unsolved. |
Hi! look this project https://github.com/leech001/Security-fire-alarm-ESP8266 |
keepLiveTime = 120 tim = Timer(-1) def keepLiveTimeCb(c): shell use ping() func |
I've explored this issue and its comments and believe it can be closed:
|
您好,您的邮件已收到。
|
Traceback (most recent call last):
File "main.py", line 55, in
File "umqtt/simple.py", line 202, in check_msg
File "umqtt/simple.py", line 171, in wait_msg
OSError: -1
The text was updated successfully, but these errors were encountered: