clean onError

This commit is contained in:
Me No Dev 2016-04-05 11:22:20 +03:00
parent 7e22511258
commit e871a222fc
1 changed files with 2 additions and 3 deletions

View File

@ -146,7 +146,7 @@ void AsyncWebServerRequest::_onData(void *buf, size_t len){
void AsyncWebServerRequest::_onPoll(){
//os_printf("p\n");
if(_response != NULL && !_response->_finished() && _client->canSend()){
if(_response != NULL && _client != NULL && _client->canSend() && !_response->_finished()){
_response->_ack(this, 0, 0);
}
}
@ -165,8 +165,7 @@ void AsyncWebServerRequest::_onAck(size_t len, uint32_t time){
}
void AsyncWebServerRequest::_onError(int8_t error){
if(error != -11)
os_printf("ERROR[%d] %s, state: %s\n", error, _client->errorToString(error), _client->stateToString());
}
void AsyncWebServerRequest::_onTimeout(uint32_t time){