fix case where connection is already freed
This commit is contained in:
1 parent
42a3f3d8b8
commit
2f76a9f5b6
1 file changed
+6
-4
+6
-4
@@ -601,10 +601,12 @@ int8_t AsyncClient::abort(){
|
||||
}
|
||||
|
||||
void AsyncClient::close(bool now){
|
||||
if(_in_lwip_thread){
|
||||
tcp_recved(_pcb, _rx_ack_len);
|
||||
} else {
|
||||
_tcp_recved(_pcb, _rx_ack_len);
|
||||
if(_pcb){
|
||||
if(_in_lwip_thread){
|
||||
tcp_recved(_pcb, _rx_ack_len);
|
||||
} else {
|
||||
_tcp_recved(_pcb, _rx_ack_len);
|
||||
}
|
||||
}
|
||||
if(now)
|
||||
_close();
|
||||
|
||||
Reference in new issue
Block a user