webby
webby copied to clipboard
Overlapped packets not being read
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))