[Top][All Lists]

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

Re: [lwip-users] http_sent cb shows 1 byte trailer [RAW]

From: address@hidden
Subject: Re: [lwip-users] http_sent cb shows 1 byte trailer [RAW]
Date: Mon, 10 Aug 2009 21:50:03 +0200
User-agent: Thunderbird (Macintosh/20090605)

Chris Strahm wrote:
Maybe recursion?
Where is close_conn being called from here?

It comes from my send_data() routine.
Once all of the data to send has been written to tcp_write(),
then close_conn gets called, and send_data() returns.

I scratched my head for a while trying to understand
how this all worked.  tcp_write() is just sending the
data to the queue, it has not yet been delivered,
yet close_conn() gets called.

tcp_close() (like tcp_write()) only enqueues a segment (containing a FIN only, in this case) to be sent. This segment (like all other data) is re-sent until an ACK is received for it. Only after this ACK has been received, the connection actually goes into a real closing state.

However, that still doesn't explain why close_conn() is called twice or why arg is NULL.

Well based on what the guys have now said, I guess it is all working, or at
least acting the way it is suppose to.

Not really. I don't see arg being null in any of the functions.


reply via email to

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