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

Do not await disconnect forever #29

Merged
merged 3 commits into from
Mar 3, 2019
Merged

Do not await disconnect forever #29

merged 3 commits into from
Mar 3, 2019

Conversation

sveljko
Copy link
Contributor

@sveljko sveljko commented Mar 3, 2019

No description provided.

Instead, do a short `delay()` in each iteration. This should
allow the rest of the SW to "do its stuff", like, kicking the
WDT and such.
There was a bug in PubSubClient::stop() - a surplus call to
`input_state()`. Also, it now waits for data shorter, not the usual
"full (default) time" . This time is not yet user settable.

Since ESP8266 can, in some weird and as-of-yet-unexplained situations,
take a _long_ time (hours, even) to change the state of the
`WiFiClient` to "not connected" after a `stop()`, we no longer await
this disconnection "forever".  There is now a timeout (for now, not
user-settable) and we give up after a short while. This might lead to
some (probably temporary) leaks, but, we haven't run into problems in
our testing.
@vveljko vveljko merged commit 37251c9 into pubnub:master Mar 3, 2019
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

Successfully merging this pull request may close these issues.

2 participants