Delete recording thread item from map only if the thread has actually stopped

This commit is contained in:
Fabio Manganiello 2019-03-17 22:55:36 +01:00
parent 81a200bd4e
commit cbe4d8cd78

View file

@ -167,7 +167,7 @@ class CameraPlugin(Plugin):
self.logger.info('A recording thread is running, waiting for termination')
if self._recording_threads[device_id].is_alive():
self._recording_threads[device_id].join()
del self._recording_threads[device_id]
del self._recording_threads[device_id]
if device_id in self._devices:
self._devices[device_id].release()