Replies: 2 comments 2 replies
-
what is the keep alive interval you are connecting with? If it's less rhat 120, and you are not polling the eventloop, that means there won't be any Ping requests and hence broker might close the connection. |
Beta Was this translation helpful? Give feedback.
2 replies
-
So I tried a variety of values and none work. If I call sleep during the event loop, the connection is broken. I have an app that listens to mqtt for certain messages and then send an iOS push notification to the user. There can be a lot of notifications so some people want to “snooze” notifications for x amount of time. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an app which runs async rumqtt. In the app, the user can delay receiving messages. To do this, I thought I could add thread::sleep(120) to the code to delay the messages. I tried using tokio::time::sleep as well. But this keeps closing the connection with this error message: "CERROR::ConnectionError::Mqtt state: Io error: Custom { kind: ConnectionAborted, error: "connection closed by peer" }".
Any suggestions to make this work? or is it not possible?
Beta Was this translation helpful? Give feedback.
All reactions