Skip to content

Commit

Permalink
"Remove checking of PONG event after receiving data"
Browse files Browse the repository at this point in the history
As websockets sansio protocol is not propagating this event after receiving data
  • Loading branch information
gourav-kandoria committed Aug 29, 2023
1 parent 803100c commit 7519e6b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions uvicorn/protocols/websockets/websockets_sansio_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ def handle_events(self) -> None:
self.handle_bytes(event)
elif event.opcode == Opcode.PING:
self.handle_ping(event)
elif event.opcode == Opcode.PONG:
self.handle_pong(event)
elif event.opcode == Opcode.CLOSE:
self.handle_close(event)

Expand Down Expand Up @@ -217,9 +215,6 @@ def handle_ping(self, event: Frame) -> None:
output = self.conn.data_to_send()
self.transport.writelines(output)

def handle_pong(self, event: Frame) -> None:
pass

def handle_close(self, event: Frame) -> None:
if not self.close_sent and not self.transport.is_closing():
disconnect_event: WebSocketDisconnectEvent = {
Expand Down

0 comments on commit 7519e6b

Please sign in to comment.