We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea5e5c7 commit 53d5e52Copy full SHA for 53d5e52
uvicorn/protocols/websockets/wsproto_impl.py
@@ -86,7 +86,9 @@ def data_received(self, data):
86
self.transport.write(self.conn.send(err.event_hint))
87
self.transport.close()
88
else:
89
- self.handle_no_connect(events.CloseConnection(code=1007))
+ # Response with the "1002 Protocol Error" code.
90
+ # See https://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number
91
+ self.handle_no_connect(events.CloseConnection(code=1002))
92
93
self.handle_events()
94
0 commit comments