-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 mqtt server goes offline (host shut off), and comes back online.... #1466
Comments
Can you provide a sample of your connection code? |
The code is exactly the same as the example that you provide
…On Mon, Apr 4, 2022 at 4:37 AM Farhan Yahaya ***@***.***> wrote:
Can you provide a sample of your connection code?
*Note*: when reconnectPeriod is set to 0 reconnection is disabled.
reference <https://github.com/mqttjs/MQTT.js#client>
—
Reply to this email directly, view it on GitHub
<#1466 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABS6UTZC32KC3Q22J7TBYELVDLH73ANCNFSM5SD7DMXA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I think I have the same problem - if server goes away and client keeps trying to publish,
All examples show using client.end() in the error handler.
When I remove client.end(), the client library reconnects successfully when the server back and continues to send messages as expected. Other clients listening successfully reconnect on their own and receive messages. I think it's related to this open issue: #1284 Also, can someone clarify why/when we would want to call end() ? This is against the eclipse mqtt broker. |
MQTT 5.0.0 BETA is now available! Try it out and give us feedback: |
This is an automated message to let you know that this issue has If this issue is still important, you can simply comment with a Thank you for your contribution. |
This issue was automatically closed due to inactivity. |
when mqtt server goes offline (host shut off), and comes back online.... this library's reconnect handler does not recover and does not reconnect.
Need example showing how to accomplish this
The text was updated successfully, but these errors were encountered: