Am 20.12.2018 um 14:15 schrieb Nadav Popplewell:
Hi everybody,

Please excuse me if I’m asking a silly question, but I’m now clear about the state of the PCB when tcp_err is called.

The documentation states: *The error callback function does not get the pcb passed to it as a parameter since the pcb **may**already have been deallocated.*

**

What I have a problem with is the *may* bit,

Is the pcb deallocated or not?

It is *always* deallocated, but not always before calling this callback. Sometimes it's deallocated before, sometimes after the 'err' callback is called.

Same as for code, patches for docs are always welcome!

Regards,
Simon


I know from experience that if tcp_err is called because tcp_connect failed then the PCB is deallocated and should NOT be closed by my code.

But is this always the case?

Thanks,

Nadav


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



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

Reply via email to