Commit f9b694d5 authored by ibuler's avatar ibuler

[Bugfix] catch exceptiton

parent ad7c59ea
...@@ -212,7 +212,10 @@ class WSProxy: ...@@ -212,7 +212,10 @@ class WSProxy:
def forward(self): def forward(self):
while not self.stop_event.is_set(): while not self.stop_event.is_set():
data = self.child.recv(BUF_SIZE) try:
data = self.child.recv(BUF_SIZE)
except OSError:
continue
if len(data) == 0: if len(data) == 0:
self.close() self.close()
self.ws.emit("data", {'data': data.decode("utf-8"), 'room': self.connection}, room=self.room) self.ws.emit("data", {'data': data.decode("utf-8"), 'room': self.connection}, room=self.room)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment