Interrupting passive socket recv

Sean Hinde <>
Thu Dec 14 17:28:09 CET 2000

Hmm, good point. You are right, the connections will sit in the listen queue
until grabbed by accept. The only issue would be if the queue filled up...
unlikely though possible under heavy load (There is a parameter {backlog, B}
to listen(), defaulted to 5)

It's still pretty horrible to kill or have to timeout all the time though.
What do you set your timeout to out of interest?

> I still don't like the timeout solution that I have to use in 
> my own servers,
> but I don't understand in which case you would loose any 
> connection. You
> do not *have* to call accept() all the time, it is what the 
> socket backlog is
> here for, isn't it?

- Sean

This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.

More information about the erlang-questions mailing list