uWebSockets icon indicating copy to clipboard operation
uWebSockets copied to clipboard

only drop text and binary message when pressure, control message such as ping pong and close message should not be drop

Open gubaojian opened this issue 6 months ago • 2 comments

code in uwebsockets such send ping or send pong or send close, not check the drop status. which will lead to control message lose when backpressure. the pr will fix this and only drop text or binary message when backpressure

gubaojian avatar Jul 04 '25 07:07 gubaojian

Why would control messages be exempt from backpressure logic? Control messages are not critically important, most of them are simple pings or pongs or close frames.

If you've reached the maxBackpressure, that's it. It will drop.

uNetworkingAB avatar Jul 04 '25 08:07 uNetworkingAB

Why would control messages be exempt from backpressure logic? Control messages are not critically important, most of them are simple pings or pongs or close frames.

If you've reached the maxBackpressure, that's it. It will drop.

some ws client use ping pong to keep alive. client send ping, server return pong. if client send ping, not receive pong, it will assume connection lost. when server handle lot of message in backpressure, connection is ok, but pong be dropped. client not not receive pong, client will assume connection be dead. connection will be close by client. this behavior is not right.

gubaojian avatar Jul 04 '25 09:07 gubaojian