mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Updater.cpp:
- use new AutoInterruptLock - add delay to give the RTOS some time to handle TCP WiFiClient.cpp - add stopAllexcepted to cancel all TCP excepted one ClientContext.h - add getLocalPort() ESP8266HTTPUpdate.cpp - close all not needed TCP and UDP osapi.h - missing commit from SDK
This commit is contained in:
@ -284,3 +284,27 @@ void WiFiClient::stopAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WiFiClient::stopAllexcepted(WiFiClient * exC) {
|
||||
for (WiFiClient* it = _s_first; it; it = it->_next) {
|
||||
ClientContext* c = it->_client;
|
||||
|
||||
if(c && exC->_client) {
|
||||
if(exC->_client->getRemoteAddress() == c->getRemoteAddress()) {
|
||||
if(exC->_client->getRemotePort() == c->getRemotePort()) {
|
||||
if(exC->_client->getLocalPort() == c->getLocalPort()) {
|
||||
// ignore this
|
||||
c = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (c) {
|
||||
c->abort();
|
||||
c->unref();
|
||||
it->_client = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user