Skip to content

Commit

Permalink
WebSocket error when handling PING packet (Fixes #129)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Apr 14, 2023
1 parent bb75e15 commit 87cd098
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/microdot_asyncio_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def receive(self):
opcode, payload = await self._read_frame()
send_opcode, data = self._process_websocket_frame(opcode, payload)
if send_opcode: # pragma: no cover
await self.send(send_opcode, data)
await self.send(data, send_opcode)
elif data: # pragma: no branch
return data

Expand Down
2 changes: 1 addition & 1 deletion src/microdot_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def receive(self):
opcode, payload = self._read_frame()
send_opcode, data = self._process_websocket_frame(opcode, payload)
if send_opcode: # pragma: no cover
self.send(send_opcode, data)
self.send(data, send_opcode)
elif data: # pragma: no branch
return data

Expand Down

0 comments on commit 87cd098

Please sign in to comment.