mirror of
https://github.com/me-no-dev/AsyncTCP.git
synced 2025-08-14 01:54:29 +02:00
fix case where connection is already freed
This commit is contained in:
@@ -601,11 +601,13 @@ int8_t AsyncClient::abort(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AsyncClient::close(bool now){
|
void AsyncClient::close(bool now){
|
||||||
|
if(_pcb){
|
||||||
if(_in_lwip_thread){
|
if(_in_lwip_thread){
|
||||||
tcp_recved(_pcb, _rx_ack_len);
|
tcp_recved(_pcb, _rx_ack_len);
|
||||||
} else {
|
} else {
|
||||||
_tcp_recved(_pcb, _rx_ack_len);
|
_tcp_recved(_pcb, _rx_ack_len);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(now)
|
if(now)
|
||||||
_close();
|
_close();
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user