[Libwebsockets] client never connects if lws_service timeout is zero

Andy Green andy at warmcat.com
Fri Oct 7 19:02:09 CEST 2016



On October 8, 2016 12:19:47 AM GMT+08:00, Rob Agar <rob at engineeredarts.co.uk> wrote:
>Hi all
>
>I've just come across an odd problem when updating to 2.1.  If I pass 
>zero as the timeout to /lws_service/, my client never connects to the 

The timeout now gets 'adjusted' before the poll wait, zero is used to indicate something needs 'forced service' and should be handled first.  'Forced service' means the connection needs service even though there is no associated network activity, for example some http/1.1 pipelined headers are stored in the ah rx buffer attached to the connection.

>server, but if I set it to 1ms, it works as it did before when it used
>1.7
>
>I'll try and replicate with a minimal test case & raise an issue if I 
>can, but in the mean time has anyone else found this behaviour? Or am I
>
>forgetting to do something?

What's up with setting it to something nonzero?  0 will cause the default poll() type connection to busywait.  It shouldn't be used under normal circumstances.

-Andy

>cheers
>
>Rob
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list