Catch broken pipe when sending to websocket

This commit is contained in:
Nicolas Mowen 2023-08-22 13:18:26 -06:00 committed by GitHub
parent 7c629c1874
commit 54f0b3c61e
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)
except ValueError:
pass
except ConnectionResetError as e:
except (BrokenPipeError, ConnectionResetError) as e:
logger.debug(f"Websocket unexpectedly closed {e}")
elif self.converter.process.poll() is not None:
break