The streaming thread shouldn't fail and exit if it fails closing a client socket

This commit is contained in:
Fabio Manganiello 2020-09-25 17:28:25 +02:00
parent 09f9e974b1
commit c12e7bab90

View file

@ -155,7 +155,10 @@ class CameraPiPlugin(CameraPlugin):
self.logger.info('Client closed connection')
finally:
if sock:
sock.close()
try:
sock.close()
except Exception as e:
self.logger.warning('Error while closing client socket: {}'.format(str(e)))
finally:
self._cleanup_stream(camera, server_socket, sock)
try: