[libnice] Connection dropped on Windows while fast retransmitting in reliable agent.
philip at tecnocode.co.uk
Mon Dec 15 15:47:22 PST 2014
On Wed, 2014-11-12 at 15:15 +0100, Radosław Kołodziejczyk wrote:
> Now, this might sound ok, but the problem is that the transmit
> function does not account for EAGAIN or EWOULDBLOCK errors (which are
> not really fatal) and this created a very peculiar race condition that
> gave us a headache. Enable extended logs - problem gone. Add some
> sleep - problem gone. The reason for that is that if the fast
> retransmit happens to be when the socket is (temporarily) busy, our
> connection goes down. If you give sockets a tiny bit of time to flush
> - problem goes away.
That’s a great analysis, and it looks like you’re correct. Thanks a lot
for looking into this, and sorry for taking so long to get to it
I’ve put together a patch (basically the same approach you took — loop
until the EWOULDBLOCK goes away) and filed a bug:
It will need review, but hopefully should get sorted soon.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 213 bytes
Desc: This is a digitally signed message part
More information about the nice