On Wed, 2009-07-01 at 11:40 +0200, Bernhard 'Gustl' Bauer wrote:
When I send out data, I get http_sent() calls. If all data is sent out I
call a tcp_close(). Unfortunately pcb->state is either ESTABLISHED or
CLOSE_WAIT and neither does free tcp_pcb.
That's odd. Is this the state before or after you've called tcp_close
()? If you've called tcp_close() it should be in FIN_WAIT1, FIN_WAIT2,
CLOSING, or TIME_WAIT on its way to CLOSED. CLOSE_WAIT is entered if
the other end closes the connection first, and then when you call
tcp_close() it should move to LAST_ACK and then CLOSED.