parent
174e9afa7b
commit
c54f19282a
@ -240,5 +240,5 @@ class AudioChopper(threading.Thread, metaclass=ABCMeta):
|
||||
try:
|
||||
readers = wait([w.outputReader for w in self.writers])
|
||||
return [r.recv() for r in readers]
|
||||
except EOFError:
|
||||
except (EOFError, OSError):
|
||||
return None
|
||||
|
@ -41,7 +41,10 @@ class Client(ABC):
|
||||
threading.Thread(target=mp_passthru).start()
|
||||
|
||||
def send(self, data):
|
||||
try:
|
||||
self.conn.send(data)
|
||||
except IOError:
|
||||
self.close()
|
||||
|
||||
def close(self):
|
||||
self.conn.close()
|
||||
|
@ -16,7 +16,7 @@ OPCODE_PING = 0x09
|
||||
OPCODE_PONG = 0x0A
|
||||
|
||||
|
||||
class WebSocketException(Exception):
|
||||
class WebSocketException(IOError):
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user