File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -656,16 +656,12 @@ static esp_err_t _tcp_close(tcp_pcb **pcb, AsyncClient *client) {
656656static err_t _tcp_abort_api (struct tcpip_api_call_data *api_call_msg) {
657657 // Like close(), we must ensure that the queue is cleared
658658 tcp_api_call_t *msg = (tcp_api_call_t *)api_call_msg;
659- msg->err = ERR_CONN;
660659 if (*msg->pcb ) {
661- tcp_pcb *pcb = *msg->pcb ;
662- _reset_tcp_callbacks (pcb, msg->close );
663- tcp_abort (pcb);
660+ tcp_abort (*msg->pcb );
664661 *msg->pcb = nullptr ; // PCB is now the property of LwIP
665- msg->err = ERR_OK ;
662+ msg->err = ERR_ABRT ;
666663 } else {
667- // Ensure there is not an error event queued for this client
668- _remove_events_for_client (msg->close );
664+ msg->err = ERR_CONN;
669665 }
670666 return msg->err ;
671667}
@@ -921,11 +917,8 @@ void AsyncClient::close(bool now) {
921917}
922918
923919int8_t AsyncClient::abort () {
924- if (_pcb) {
925- _tcp_abort (&_pcb, this );
926- // _pcb is now NULL
927- }
928- return ERR_ABRT;
920+ return _tcp_abort (&_pcb, this );
921+ // _pcb is now NULL
929922}
930923
931924size_t AsyncClient::space () const {
You can’t perform that action at this time.
0 commit comments