Pass blocking portal to mjpeg_stream.stop()

This was updated in LabThings-FastAPI v0.0.10, but wasn't changed
as we moved over.
This commit is contained in:
Julian Stirling 2025-07-07 22:28:07 +01:00
parent e53405f1ef
commit 421efa2866

View file

@ -446,8 +446,9 @@ class StreamingPiCamera2(BaseCamera):
else:
self.stream_active = False
if stop_web_stream:
self.mjpeg_stream.stop()
self.lores_mjpeg_stream.stop()
portal = lt.get_blocking_portal(self)
self.mjpeg_stream.stop(portal)
self.lores_mjpeg_stream.stop(portal)
logging.info("Stopped MJPEG stream.")
# Adding a sleep to prevent camera getting confused by rapid commands