mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
Web server: disconnect at the end of callback, not after sendContent (#304)
This commit is contained in:
parent
e562124eaf
commit
21d50e104c
@ -172,10 +172,6 @@ void ESP8266WebServer::sendContent(String content) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint16_t maxWait = HTTP_MAX_CLOSE_WAIT;
|
|
||||||
while(_currentClient.connected() && maxWait--) {
|
|
||||||
delay(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String ESP8266WebServer::arg(const char* name) {
|
String ESP8266WebServer::arg(const char* name) {
|
||||||
@ -245,6 +241,10 @@ void ESP8266WebServer::_handleRequest() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t maxWait = HTTP_MAX_CLOSE_WAIT;
|
||||||
|
while(_currentClient.connected() && maxWait--) {
|
||||||
|
delay(1);
|
||||||
|
}
|
||||||
_currentClient = WiFiClient();
|
_currentClient = WiFiClient();
|
||||||
_currentUri = String();
|
_currentUri = String();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user