We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cc8f66 commit 6cd1e08Copy full SHA for 6cd1e08
src/WebRequest.cpp
@@ -231,9 +231,20 @@ void AsyncWebServerRequest::_removeNotInterestingHeaders()
231
void AsyncWebServerRequest::_onPoll()
232
{
233
// os_printf("p\n");
234
- if (_response != NULL && _client != NULL && _client->canSend() && !_response->_finished())
+ if (_response != NULL && _client != NULL && _client->canSend())
235
236
- _response->_ack(this, 0, 0);
+ if (!_response->_finished())
237
+ {
238
+ _response->_ack(this, 0, 0);
239
+ }
240
+ else
241
242
+ AsyncWebServerResponse *r = _response;
243
+ _response = NULL;
244
+ delete r;
245
+
246
+ _client->close();
247
248
}
249
250
0 commit comments