nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.84k stars 304 forks source link

websocket does not handle multiple requests in a packet #159

Closed granolamatt closed 5 years ago

granolamatt commented 5 years ago

While using chrome and subscribing to multiple (64 was my case) keys in a for loop, webdis will drop requests when the requests are grouped into a single network packet. I assume that the grouping is because of Nagle's algorithm.

If I change the if statement to a while statement in websocket.c function ws_add_data it fixes my problem. I am submitting a pull request as well for this issue.

nicolasff commented 5 years ago

Let's close this one to have a single issue tracking this bug.