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.

Simon


_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to