-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix issue #308 #314
base: master
Are you sure you want to change the base?
Fix issue #308 #314
Conversation
Hi @jorgecis the code you've removed existed for a reason. It handles the case where there is a slow connection between the board and the broker, and the response from the broker don't arrive instantly. If you're only testing this on a local broker you won't hit the problem. What could be happening here is that the tight loop in Instead of your proposed fix, can you add a |
Hi @knolleary
|
Please can you try adding a A 50ms delay to fix a 15 second delay doesn't feel unreasonable to me. |
Hi, Knolleary. I have tried the change and also played around with the "fix". A delay before and/or after the .loop() request did not make any change to the behavior to let him run in the timeout. |
@stefanbode I'm not clear which change/fix you've tried. There's the change proposed in the original PR that I'm not in favour of as it assumes a good network. There is then my suggested alternative to simply put a delay in the while loop this pr otherwise removes. (This is not the same as putting a delay in your own code around your calls to client.loop) Can you clarify exactly what you've tested? |
I also tried the delay(50) in the while-loop just after the start. It looks like also this solves the problem. This would hint to your "hammering" idea as a root cause. I finally just inserted a yield(); and wow this is doing the same without a large time penalty. You're right. I first did it wrong. Now with the yield() in YOUR code just after the while it works great. I'm using TLS.
|
This fix the issue #308 in esp8266 not sure for other boards, we need test it more.