From cbe4d8cd7873e28709b9e2b276dad1f3a1ba3185 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 17 Mar 2019 22:55:36 +0100 Subject: [PATCH] Delete recording thread item from map only if the thread has actually stopped --- platypush/plugins/camera/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/camera/__init__.py b/platypush/plugins/camera/__init__.py index 76bef7cec1..a93224a6c9 100644 --- a/platypush/plugins/camera/__init__.py +++ b/platypush/plugins/camera/__init__.py @@ -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()