Skip to content

Commit bd1aa97

Browse files
author
Eli Reekmans
committed
Work around client disconnecting issue.
1 parent 78b222d commit bd1aa97

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

websocket_server/websocket_server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def handle(self):
177177
if not self.handshake_done:
178178
self.handshake()
179179
elif self.valid_client:
180-
self.read_next_message()
180+
pass
181181

182182
def read_bytes(self, num):
183183
# python3 gives ordinal of byte directly
@@ -290,7 +290,10 @@ def send_text(self, message, opcode=OPCODE_TEXT):
290290
raise Exception("Message is too big. Consider breaking it into chunks.")
291291
return
292292

293-
self.request.send(header + payload)
293+
try:
294+
self.request.send(header + payload)
295+
except:
296+
pass
294297

295298
def handshake(self):
296299
message = self.request.recv(1024).decode().strip()

0 commit comments

Comments
 (0)