lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Freeing all pbufs on tcp_abort()


From: JM
Subject: Re: [lwip-users] Freeing all pbufs on tcp_abort()
Date: Tue, 1 Sep 2009 08:52:23 -0700 (PDT)

I don't recall the exact error, but I have seen the error indicating it's out of tcp_pcbs and it's not that one.  I do know however that it is complaining about being out of pbufs, and it appears occasionally and randomly while it's receiving data.  The stats also show I exceed pbufs in this circumstance. 

--- On Tue, 9/1/09, address@hidden <address@hidden> wrote:

From: address@hidden <address@hidden>
Subject: Re: [lwip-users] Freeing all pbufs on tcp_abort()
To: "Mailing list for lwIP users" <address@hidden>
Date: Tuesday, September 1, 2009, 11:45 AM

JM wrote:
> What is the proper way to close a connection and free all resources, namely pbufs, associated with it?  In my application, I have to use tcp_abort to end the connection.  (I do indeed have to send a RST; Winamp does the same thing with streaming audio and I'm emulating that).
> I can connect to to a host and receive data fine, but when I end that connection and initiate a different connection, my debug output occasionally indicates I'm out of MEMP_POOL.
>
"Out of MEMP_POOL" can mean anything. You need to know exactly which pool and see if it is really the pbufs you are running out of. But I'd rather guess it's the tcp_pcb-pool: aborted pcbs are put on the time-wait list. If you then open a new connection, you will eventually run out of tcp_pcbs. However, that's not a fatal warning as the tcp code then frees the oldest pcb in time-wait and uses it. You should check the stats (or use the prin_stats function) to see which memp pool was emtpy.

Simon


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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