-
Notifications
You must be signed in to change notification settings - Fork 3
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
The keepalive parameter doesn't seem to work #14
Comments
Hi @Sunny0218, I'm happy to see you! If you don't want to try reconnecting to the broker, you can register the 'on-reconnect' event to determine when to disconnect the client (if reconnecting counter > 3 then disconnect it). Additionally, error messages would not be shown in a production environment. |
@tommy44458 Thank you for your reply. I would like to ask one more question based on your reply: Is the reconnect mechanism disconnected by the method "mqttHook.disconnect()"? |
@Sunny0218 Yes, that's right. |
Hello, it's me. The client keeps on trying to reconnect for me when I set keepalive to 0. Is there a way to disable the auto-reconnect mechanism? Also, is there any way to hide the error report in the console? Looking forward to your reply.
![1705912929375](https://private-user-images.githubusercontent.com/79628634/298516695-1678914d-8c17-4685-8e94-ec84b8d8e69f.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MjQxNzEsIm5iZiI6MTcyMDUyMzg3MSwicGF0aCI6Ii83OTYyODYzNC8yOTg1MTY2OTUtMTY3ODkxNGQtOGMxNy00Njg1LThlOTQtZWM4NGI4ZDhlNjlmLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDExMTc1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM4N2JhZGRjMjlmNDNkYzg3M2I1YzFmNGE1ODgwOWNkMDg5ZWU5ZjAxMzE0NjI0ZTIwNGFhYWFjOTUwZGFmZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Oc7YDuRnKWLFwRwNOUGVSzXuTiGWRidv-Yo5hrUTJbo)
The text was updated successfully, but these errors were encountered: