mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 06:14:09 +00:00
Fixed bug #3112 (faulty behaviour calling tcp_listen() when already listening)
This commit is contained in:
parent
0418edb7b6
commit
12fc0239c2
@ -312,6 +312,10 @@ tcp_listen(struct tcp_pcb *pcb)
|
||||
{
|
||||
struct tcp_pcb_listen *lpcb;
|
||||
|
||||
/* already listening? */
|
||||
if(pcb->state == LISTEN) {
|
||||
return pcb;
|
||||
}
|
||||
lpcb = memp_malloc(MEMP_TCP_PCB_LISTEN);
|
||||
if(lpcb == NULL) {
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user