From 69a03fa0255e45e8fb08f10753172dce3cca4d73 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 17 Aug 2019 00:27:19 +0200 Subject: [PATCH] Do wait_recording until the client disconnects --- platypush/plugins/camera/pi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/camera/pi.py b/platypush/plugins/camera/pi.py index 773e57496b..4c8c68a6a6 100644 --- a/platypush/plugins/camera/pi.py +++ b/platypush/plugins/camera/pi.py @@ -449,7 +449,8 @@ class CameraPiPlugin(CameraPlugin): try: if stream: camera.start_recording(stream, format=format) - camera.wait_recording() + while True: + camera.wait_recording(1) except ConnectionError: self.logger.info('Client closed connection') finally: