babl-ws / babl

Low-latency WebSocket Server
https://babl.ws
Apache License 2.0
68 stars 22 forks source link

PingAgent ignores zero-data ping-packets #98

Open Crokoking opened 2 years ago

Crokoking commented 2 years ago

The websocket standard allows for ping-packets with no data. But since the PingAgent uses 0 to determine that it doesn't need to send a pong it essentially ignores it. There is a related issue that encodeData() in the FrameEncoder processes zero-length packets with zero frames and thereby ignores them.

epickrram commented 2 years ago

Hi, thanks for the report. We'll look at this when possible. In the mean time, feel free to submit a PR containing a fix.