Skip to content

Commit 721c161

Browse files
committed
Directly reset callbacks without going through lwip functions (fix #30)
1 parent 3f9c820 commit 721c161

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/AsyncTCP.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,10 +1052,15 @@ void AsyncClient::_error(int8_t err) {
10521052
TCP_MUTEX_LOCK();
10531053
tcp_arg(_pcb, NULL);
10541054
if (_pcb->state == LISTEN) {
1055-
tcp_sent(_pcb, NULL);
1056-
tcp_recv(_pcb, NULL);
1057-
tcp_err(_pcb, NULL);
1058-
tcp_poll(_pcb, NULL, 0);
1055+
// tcp_sent(_pcb, NULL);
1056+
_pcb->sent = NULL;
1057+
// tcp_recv(_pcb, NULL);
1058+
_pcb->recv = NULL;
1059+
// tcp_err(_pcb, NULL);
1060+
_pcb->errf = NULL;
1061+
// tcp_poll(_pcb, NULL, 0);
1062+
_pcb->poll = NULL;
1063+
_pcb->pollinterval = 0;
10591064
}
10601065
TCP_MUTEX_UNLOCK();
10611066
_free_closed_slot();

0 commit comments

Comments
 (0)