[Libwebsockets] disconnection after 310 secondes

Andy Green andy at warmcat.com
Tue Sep 29 14:57:38 CEST 2020

On 9/29/20 1:48 PM, Peiffer Eric wrote:
> Hi,
> I have put libwebsockets trace to the max in order to see  what's happened.
> And just before I receive the LWS_CALLBACK_CLOSED I have the following 
> traces:
> level: 8 log: lws_validity_cb: wsi 0x7f66ac00dad0: *validity too old*

If your connections are actually doing stuff in both directions during 
this time, you can notify lws using lws_validity_confirmed(wsi) when you 
saw something that means the connection must be working in both directions


and it will reset this timeout.

At context / vhost creation time you can set the timeouts


point to a lws_retry_bo_t and set these (in secs)


if you don't, they use the context default which is for ~5min.


More information about the Libwebsockets mailing list