libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

will the callback function going to case LWS_CALLBACK_CLOSED if the websocket client have not sent FIN ACK or RST?

Open pppaulpeter opened this issue 1 year ago • 6 comments

Hi Andy,

image

as shown in the image, the websocket client have not close the websocket conenction, but my websocket server going to the callback case LWS_CALLBACK_CLOSED, i don't know why, if i change the websocket client to postman from web client, then i can't reproduce the problem. will the lws going to LWS_CALLBACK_CLOSED because the other side tcp windows buffer is full? what could be the root cause?

pppaulpeter avatar Nov 07 '24 02:11 pppaulpeter

There are verbose lws logs that describe what it's doing and why. You should maybe have a look?

lws-team avatar Nov 07 '24 06:11 lws-team

There are verbose lws logs that describe what it's doing and why. You should maybe have a look?

i set the debug level to debug debug_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_INFO | LLL_DEBUG ; but it didn't print much information, this is the log after closed Nov 7 11:17:16 : ^[[35;1m[2024/11/07 11:17:16:4231] N: lws_gate_accepts: on = 0 Nov 7 11:17:16 : ^[[0m Nov 7 11:17:16 : ^[[35;1m[2024/11/07 11:17:16:4232] N: __lws_lc_untag: -- [wsisrv|3e|adopted] (1) 141.014ms i will check it again

pppaulpeter avatar Nov 07 '24 07:11 pppaulpeter

Build with CMAKE_BUILD_TYPE=DEBUG

lws-team avatar Nov 07 '24 07:11 lws-team

I got the same issues, did you fix it? @pppaulpeter

zg9uagfv avatar Dec 16 '24 08:12 zg9uagfv

Did you trouble yourself to look at the verbose logs so you can understand what is happening to the connection?

lws-team avatar Dec 16 '24 09:12 lws-team

I got the same issues, did you fix it? @pppaulpeter

i have not reproduced the problem yet :(

pppaulpeter avatar Dec 20 '24 02:12 pppaulpeter