[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp_err and tcp_close
From: |
address@hidden |
Subject: |
Re: [lwip-users] tcp_err and tcp_close |
Date: |
Thu, 20 Dec 2018 16:05:45 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 |
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
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users