Skip to content

Commit

Permalink
don't queue empty websocket payloads, but do log a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Dec 18, 2024
1 parent 24af7b7 commit a98ab0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xpra/net/websockets/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def parse_ws_frame(self, buf: SizedBuffer) -> None:
self.ws_payload.append(payload)
continue
if opcode == OPCODE.BINARY:
if not full_payload:
log.warn("Warning: empty websocket binary payload")
continue
self._read_queue_put(full_payload)
elif opcode == OPCODE.TEXT:
if first_time(f"ws-text-frame-from-{self._conn}"):
Expand Down

0 comments on commit a98ab0d

Please sign in to comment.