[Libwebsockets] minimal_ws_server_threadpool crashes when timeout set to low value

Lars Buchholz ld.b at gmx.net
Sun Jun 20 11:41:51 CEST 2021

Yes, it works. The connection is now closed properly after the timeout
is reached. Many thanks for the super fast response.


Am 19.06.2021 um 18:02 schrieb Andy Green:
> On 6/19/21 4:23 PM, Lars Buchholz wrote:
>> While trying to understand how the timeout mechanism works, I changed
>> the PENDING_TIMEOUT_THREADPOOL in the minimal_ws_server_threadpool
>> example from its 30 seconds initial value (where everything works as
>> expected) to just 10 seconds. The server starts normally and the example
>> still works fine until about 10 seconds after the client connection has
>> been established the server crashes with bad_access in function
>> lws_cancel_service().
>> I am running the example on an older version of macOS (as my hardware is
>> no longer supported for the latest version) which might be the reason
>> for the crash. Can anyone reproduce the described behavior on another
>> system? Many thanks in advance.
> Does this help?
> https://libwebsockets.org/git/libwebsockets/commit?id=a1aadf6d944cec2e7420d73139e20af20e66debc
> -Andy

More information about the Libwebsockets mailing list