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 call tcp/udp ::stopAll() when it is not required to do so #8598

Merged
merged 3 commits into from
Jun 23, 2022

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Jun 12, 2022

fixes #6123

@mcspr
Copy link
Collaborator

mcspr commented Jun 14, 2022

ArduinoOTA as well? Even a failed update kills every client
Also note of WebUpdate example

Continuing the idea, UpdaterClass should probably handle that

//This callback will be called when OTA connection has begun
void onStart(THandlerFunction fn);
//This callback will be called when OTA has finished
void onEnd(THandlerFunction fn);
//This callback will be called when OTA encountered Error
void onError(THandlerFunction_Error fn);
//This callback will be called when OTA is receiving data
void onProgress(THandlerFunction_Progress fn);

Where the user might as well do the

WiFiClient::stopAll();
WiFiUDP::stopAll();
// or, where we want some fine grained control
WiFiClient::stopAllExcept(&server.client());
WiFiUDP::stopAllExcept(&myPreciousCnC);

@d-a-v d-a-v changed the title do not call tcp/udp ::stopAll() when it is not required to to so do not call tcp/udp ::stopAll() when it is not required to do so Jun 23, 2022
@d-a-v d-a-v merged commit 7d9abbb into esp8266:master Jun 23, 2022
@d-a-v d-a-v deleted the nostopall branch June 23, 2022 20:14
mcspr added a commit that referenced this pull request Nov 3, 2022
follow-up of #8598 
similar to ArduinoOTA API, execute certain callback in the Updater context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants