Hi,
This is normal BSD semantics of a TCP listener, use SO_REUSEADDR before calling
bind to avoid the issue
Joel
> On Jun 8, 2017, at 4:18 PM, Ignacio García Pérez wrote:
>
> Hi All,
>
> I'm writing a simple FTP server that needs to be started up and shut down
> with
Ignacio García Pérez wrote:
> I'm writing a simple FTP server that needs to be started up and shut down
> with relatively high frequency (say once per minute)
That's a strange application scenario. And the result of this is what you are
seeing.
> Question:
> 1- Is this behaviour expected?
According to major communications texts authors, due to parallel paths
and some esoteric magic, some data might be in transit when you close a
TCP connection. IIRC it is mandatory that it remains that way after closure.
There is a thread on this list where Simon answered (sort of) your question