fixed bug #47743 (Closing listening tcp pcb is not posible without assert)

This commit is contained in:
goldsimon 2016-04-26 13:27:17 +02:00
parent afd1bb938e
commit afd9ee9147

View File

@ -294,8 +294,8 @@ tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data)
break;
case LISTEN:
err = ERR_OK;
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
tcp_listen_closed(pcb);
tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb);
memp_free(MEMP_TCP_PCB_LISTEN, pcb);
pcb = NULL;
break;