Hello,
Here's a bit more context to my problem. When I call tcp_close in reaction to being handed a NULL
pbuf ptr in the receive-callback, this is what happens inside file "tcp.c": Eventually
tcp_close_shutdown is called with the tcp_pcb in state CLOSE_WAIT. The "Not all data received
by application ... " branch is taken and then on line 279 the pcb is removed from the active
pcb list. At this point ALL lists (eg. tcp_bound_pcbs, tcp_listen_pcbs, tcp_active_pcbs,
tcp_tw_pcbs) are empty. Then since I called tcp_close from within the recv handler, the branch on
ln. 288 is taken, which merely sets a flag so the pcb is deleted later-on. But since the pcb is in
no list of lwip anymore that I'm aware of, how would that deferred delete even work?
Maybe you can spot my misconception better with these details?