webby icon indicating copy to clipboard operation
webby copied to clipboard

Overlapped packets not being read

Open JordiRos opened this issue 4 years ago • 0 comments

If the client is sending packets faster than the server can read, overlapped packets will be discarded. This seems to be due to a typo in the code in file webby.cpp, line 1291

if (connection->io_data_left > 0) { // etc if (0 != scan_websocket_frame(&connection->io_buf, &connection->ws_frame))

Function scan_websocket_frame returns 0 if there's another frame to be processed, so the fix is to replace the condition to

if (0 == scan_websocket_frame(&connection->io_buf, &connection->ws_frame))

JordiRos avatar Dec 14 '20 11:12 JordiRos