libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

websockets connection timeout for client not work

Open hwmagicok opened this issue 2 years ago • 1 comments

Hi, I set timeout_secs and connect_timeout_secs to 3s in lws_context_creation_info for websockets connection, but it seems not work. connection always interrupt at 10s. I use libwebsockets v4.3.0

please tell me, how can i set websockets connection timeout

2023-06-09 17:41:09.030 11799-11867 D: WsCallback in,reason=27,len=0 2023-06-09 17:41:09.030 11799-11867 D: WsCallback in,reason=85,len=0 2023-06-09 17:41:09.031 11799-11867 D: WsCallback in,reason=19,len=0 2023-06-09 17:41:09.031 11799-14773 D: WsCallback in,reason=31,len=0 2023-06-09 17:41:09.031 11799-14773 D: WsCallback in,reason=71,len=0 2023-06-09 17:41:09.031 11799-14773 D: WsCallback in,reason=71,len=0 2023-06-09 17:41:09.031 11799-14773 D: WsCallback in,reason=71,len=0 2023-06-09 17:41:14.025 11799-14773 D: WsCallback in,reason=72,len=0 2023-06-09 17:41:19.032 11799-14773 D: WsCallback in,reason=76,len=0 2023-06-09 17:41:19.032 11799-14773 E: CLIENT_CONNECTION_ERROR: Closed before conn

hwmagicok avatar Jun 09 '23 10:06 hwmagicok

What type of connections are you making? ws? wss?

We are having similar issues, we set the timeout to 10min and our connections always seem to die at around 10min. we have stable comms up to that point (with registered pings and pongs every 5 seconds at least)

lailoken avatar Apr 24 '24 20:04 lailoken