[erlang-bugs] send_timeout doesn't work

pan@REDACTED pan@REDACTED
Mon Mar 21 15:07:30 CET 2011


Hi!

Very good test program, it's obviously something wrong here, and that's 
the handling of timeouts when we are in active mode. It's broken.

Please try the attached (very simple) patch, it should fix the problem. 
It's still not tested in our daily builds, but it will soon be. Any 
feedback is welcome!

Cheers,
/Patrik

On Tue, 15 Mar 2011, Evgeniy Khramtsov wrote:

> It seems like there is a bug in send_timeout option of a TCP socket: the 
> timeout is completely ignored (at least in active-once mode).
> The code to reproduce: http://kuku.jabber.ru/~xram/lock.erl
> Just compile it and start lock:listen() in one shell and lock:send() in 
> another: over a time you will see that the receiving process is locked in 
> prim_inet:send/3 and doesn't process current message in the mailbox. You can 
> also play with PORT and SEND_TIMEOUT macros if needed.
>
> Versions tested: R13B02 and R14B01 (on Debian 2.6.32-5-amd64 SMP).
>
> -- 
> Regards,
> Evgeniy Khramtsov, ProcessOne.
> xmpp:xram@REDACTED
>
>
> ________________________________________________________________
> erlang-bugs (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcp_send_timeout.diff
Type: text/x-patch
Size: 587 bytes
Desc: fix for gen_tcp send timeouts
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20110321/fc597ce2/attachment.bin>


More information about the erlang-bugs mailing list