Catch broken pipe when sending to websocket (#7556)

This commit is contained in:
Nicolas Mowen 2023-09-01 06:06:39 -06:00 committed by GitHub
parent 737681aa4f
commit 7069ef93bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,7 +210,7 @@ class BroadcastThread(threading.Thread):
ws.send(buf, binary=True) ws.send(buf, binary=True)
except ValueError: except ValueError:
pass pass
except ConnectionResetError as e: except (BrokenPipeError, ConnectionResetError) as e:
logger.debug(f"Websocket unexpectedly closed {e}") logger.debug(f"Websocket unexpectedly closed {e}")
elif self.converter.process.poll() is not None: elif self.converter.process.poll() is not None:
break break