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

Missmatch between code and comment for intervalls #248

Closed
beikeland opened this issue Dec 1, 2019 · 3 comments
Closed

Missmatch between code and comment for intervalls #248

beikeland opened this issue Dec 1, 2019 · 3 comments

Comments

@beikeland
Copy link

// try and reconnect continuously for first 5s then try again once every 10s
if ((now < 50000) || ((now - lastMqttReconnectAttempt) > 100000)) {

Not sure if comment or code is correct, but 5s != 50000ms

@glynhudson
Copy link
Contributor

This looks correct to me, try and reconnect continuously for 5s (now < 50000) then try to re-connect every 10s ((now - lastMqttReconnectAttempt) > 100000))

@beikeland
Copy link
Author

5 seconds is 5,000ms not 50,000ms which explains my trouble with mqtt thinking it was the server not accepting the connection, but instead it was the wifi waiting almost two minutes to reconnect, despite thinking it should take 10 seconds.

glynhudson added a commit that referenced this issue Dec 7, 2019
@glynhudson
Copy link
Contributor

Damit, I was obviously blind to the number of zeros! Thanks, I've made the changes to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants