LWIP - fixed TCP panic when shutting down
- listening sockets do not handle some callbacks
This commit is contained in:
parent
566af1516a
commit
f6b5201f64
@ -156,10 +156,12 @@ static void tcp_op_close(struct socket * sock, __unused message * m)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* we are not able to handle any callback anymore */
|
/* we are not able to handle any callback anymore */
|
||||||
tcp_arg((struct tcp_pcb *)sock->pcb, NULL);
|
if (((struct tcp_pcb *)sock->pcb)->state != LISTEN) {
|
||||||
tcp_err((struct tcp_pcb *)sock->pcb, NULL);
|
tcp_arg((struct tcp_pcb *)sock->pcb, NULL);
|
||||||
tcp_sent((struct tcp_pcb *)sock->pcb, NULL);
|
tcp_err((struct tcp_pcb *)sock->pcb, NULL);
|
||||||
tcp_recv((struct tcp_pcb *)sock->pcb, NULL);
|
tcp_sent((struct tcp_pcb *)sock->pcb, NULL);
|
||||||
|
tcp_recv((struct tcp_pcb *)sock->pcb, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
err = tcp_close(sock->pcb);
|
err = tcp_close(sock->pcb);
|
||||||
assert(err == ERR_OK);
|
assert(err == ERR_OK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user