[Libwebsockets] (no subject)

"Andy Green (林安廸)" andy at warmcat.com
Mon Dec 9 07:31:28 CET 2013

On 29/11/13 23:20, the mail apparently from Simon Gauthier included:
> Hi,
> I think the send() call in output.c line 151 should check errno for
> EAGAIN and EINTR if it returns -1 since the socket is open NONBLOCK.
> It is easy to reproduce if you have some serious traffic going on, send
> will sometime return EAGAIN. In that case the library will close the
> connection.
> In that case you can wait a couple of usecond and retry the send until
> rescource is availible instead of bailing out.

Give this a try


send() having a temporarily blackout is one problem but SSL write doing 
something similar is another one, they can renegotiate their cyphers any 

The patch buffers the remainder of a "blackout" send and prioritizes 
dumping the buffer before anything else is sent.

It works with the test server when I force it to use partial sends, 
whether it will work for all cases is a bit experimental.


> Thank You
> Simon Gauthier
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://ml.libwebsockets.org/mailman/listinfo/libwebsockets

More information about the Libwebsockets mailing list