lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] MQTT:pcb has been used up because too many ack packets


From: songxz
Subject: Re: [lwip-users] MQTT:pcb has been used up because too many ack packets were lost
Date: Sun, 22 Mar 2020 18:44:22 -0700 (MST)

My solution is like below:

static void
lwip_netconn_do_close_internal(struct netconn *conn)
{
...
if (shut == NETCONN_SHUT_RDWR)

{ close = 1; } else if (shut_rx &&
((tpcb->state == FIN_WAIT_1) ||
(tpcb->state == FIN_WAIT_2) ||
(tpcb->state == CLOSING))) { close = 1; }
else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0))

{ close = 1; }
else

{ close = 0; }
//modified by realtek
if (close) {
tcp_pcb_purge(tpcb);
tpcb->snd_queuelen = 0;
}

/* Set back some callback pointers */
if (close)

{ tcp_arg(tpcb, NULL); }
…
}



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]