[erlang-bugs] Missing the tcp_closed event

Mickaël Rémond <>
Fri Apr 27 10:28:28 CEST 2007


Hello,

Can this problem be reproduced by your side ?
Do you need more informations ?

Le 13 avr. 07 à 18:23, Mickaël Rémond a écrit :

> Hello,
>
> Alexey managed to find the steps to reproduced the problem.
> You can have a process managing a TCP connection linked to a dead  
> socket under the following conditions.
>
> 0. Use active once to receive your TCP message to benefit from TCP  
> regulation
> 1. Assume we have a socket in {Active, false} state
> 2. Close its connection from the other end
> 3. call gen_tcp:send on the socket two times (It returns ok on the  
> first send, which is also wrong. The problem happens only with two  
> or more sends).
> 4. swith to {active, once} state
> => no {tcp_closed, ...} message is received by the process.
>
> If you check the state of your port after step 4 (for example with  
> inet:peername) you will receive an error enotconn.
>
> You end up with a stuck process. If you send messages to the  
> process queue to send messages on the socket it will accumulate  
> indefinitely.
>
> Please, let me know if we can do something more to help.
>
> -- 
> Mickaël Rémond
>  http://www.process-one.net/
>
>
>
> _______________________________________________
> erlang-bugs mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-bugs

-- 
Mickaël Rémond
  http://www.process-one.net/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20070427/0effd90e/attachment.html>


More information about the erlang-bugs mailing list