warmcat / libwebsockets

canonical libwebsockets.org networking library
https://libwebsockets.org
Other
4.79k stars 1.49k forks source link

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

Open pppaulpeter opened 2 weeks ago

pppaulpeter commented 2 weeks ago

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?

lws-team commented 2 weeks ago

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

pppaulpeter commented 2 weeks ago

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

lws-team commented 2 weeks ago

Build with CMAKE_BUILD_TYPE=DEBUG