libwebsockets icon indicating copy to clipboard operation
libwebsockets copied to clipboard

Too many tcp RST request?

Open bethebest0622 opened this issue 5 months ago • 4 comments

Hi

I am using libwebsockets to connect to a websocket server.(very similar with binance)

The problem is, the connection always be broken(Received LWS_CALLBACK_CLIENT_CLOSED event).

I used tcpdump to analyse it, I found there are many tcp RST package from my side.

I didn't send it in my code, could you help on this?

Is there any default setting I should do?

Thanks a lot

bethebest0622 avatar Jul 15 '25 06:07 bethebest0622

This is not a very useful way to talk about the problem... why don't you look at the lws logs and see what is actually happening?

lws-team avatar Jul 15 '25 08:07 lws-team

This is not a very useful way to talk about the problem... why don't you look at the lws logs and see what is actually happening?

could you let me know how to open the lws logs?

add in cmake -DDEBUG?

bethebest0622 avatar Jul 15 '25 08:07 bethebest0622

Look at any of the examples. If you want verbose logs, you can use -DCMAKE_BUILD_TYPE=DEBUG to build them in and set the appropriate logging bitfields... most of the examples will allow you to set this by -d1039 (usual logs, parsing, +INFO) or -d1151 (usual logs, parsing, +INFO +DEBUG). The non-verbose logs should still be enough for most cases to get an idea.

lws-team avatar Jul 15 '25 09:07 lws-team

Thanks

I will try

bethebest0622 avatar Jul 15 '25 09:07 bethebest0622