Do not remove callbacks on socket error either

The general rule is that at no time must callbacks be removed from the
AsyncTCP object while the object is still live. Clients expect this from
the AsyncTCP library.
This commit is contained in:
Alex Villacís Lasso
2021-07-29 18:01:10 -05:00
parent 14dad4679c
commit fea600a56c

View File

@@ -755,7 +755,6 @@ void AsyncClient::_error(int8_t err)
_clearWriteQueue();
if (_error_cb) _error_cb(_error_cb_arg, this, err);
if (_discard_cb) _discard_cb(_discard_cb_arg, this);
_removeAllCallbacks();
}
size_t AsyncClient::space()