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