Interrupting passive socket recv

Samuel Tardieu <>
Thu Dec 14 16:10:35 CET 2000


On 14/11, Sean Hinde wrote:

| Killing the recv process is also a bit nasty as well, though it does raise
| the additional question of how one interrupts a gen_tcp:accept. This is an
| issue for code upgrades as well as a general programming issue. The options
| seem to be the same as documented for recv - timeout and retry to allow
| space for other Erlang messages to be received - which is pretty horrible
| (lost connections)

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?





More information about the erlang-questions mailing list