1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Fix tcp error handler

This commit is contained in:
Ivan Grokhotkov 2015-06-11 18:11:00 +03:00
parent e6e57a8b81
commit c51acf2a32

View File

@ -261,8 +261,17 @@ class ClientContext {
}
void _error(err_t err) {
DEBUGV(":er %d\r\n", err);
close();
DEBUGV(":er %d %d %d\r\n", err, _size_sent, _send_waiting);
if (err != ERR_ABRT) {
abort();
}
else {
tcp_arg(_pcb, NULL);
tcp_sent(_pcb, NULL);
tcp_recv(_pcb, NULL);
tcp_err(_pcb, NULL);
_pcb = NULL;
}
if(_size_sent && _send_waiting) {
esp_schedule();
}