Skip to content
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

when client has been disconnected, but client.is_connected() is True #840

Open
showfuture opened this issue May 13, 2024 · 2 comments
Open
Labels
Status: Available No one has claimed responsibility for resolving this issue. Status: More info needed More information needed from issue author

Comments

@showfuture
Copy link

version: 1.6.1
python: 3.9.6

When I'm using paho-mqtt, sometimes in a weak network environment, there is an issue where the MQTT connection is actually disconnected, but according to client.is_connected(), the value is True, indicating that the client is still considered connected. I cannot rely on client.is_connected() to determine the connection status, which has led to significant bugs in my business logic. How can I solve this problem?

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label May 13, 2024
@JiajiaHuang
Copy link

Version: 1.6.1 and 2.1.0
The same problem exists, causing BUG.

@MattBrittan
Copy link
Contributor

Unfortunately it's not going to be possible to help without significantly more information (code, logs etc). In some cases the status of .is_connected() will not change immediatly as the connection is half open meaning the loss of connection will only be picked up by the keepalive process.

@MattBrittan MattBrittan added the Status: More info needed More information needed from issue author label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue. Status: More info needed More information needed from issue author
Projects
None yet
Development

No branches or pull requests

3 participants