vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
7.17k stars 278 forks source link

"dropped a ping request from websocket due to channel contention" #222

Closed the-sun-will-rise-tomorrow closed 7 months ago

the-sun-will-rise-tomorrow commented 7 months ago

Testing transferring large amounts of data via websocat, I hit this error.

[WARN  websocat::ws_peer] dropped a ping request from websocket due to channel contention
websocat: WebSocketError: I/O failure
websocat: error running

I think it is a RFC violation. https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2 says:

Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in response, unless it already received a Close frame.

vi commented 7 months ago

Implemented (somewhat sloppy) caching of pongs, so that there is another change to deliver them.

The scheme is not foolproof, but I expect probability of missed pongs to be much lower with change.

Please check how it behaves on master.

the-sun-will-rise-tomorrow commented 7 months ago

Thanks! It doesn't happen any more with my test.