-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not await disconnect forever (#29)
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.
- Loading branch information
Showing
2 changed files
with
41 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters