diff --git a/pytrickle/protocol.py b/pytrickle/protocol.py index 2264e51..9a0e063 100644 --- a/pytrickle/protocol.py +++ b/pytrickle/protocol.py @@ -361,7 +361,10 @@ def enqueue_frame(frame: OutputFrame): self.fps_meter.record_egress_video_frame() elif isinstance(frame, AudioOutput): self.fps_meter.record_egress_audio_frame() - + + if self.publish_task is None: + continue + await asyncio.to_thread(enqueue_frame, frame) except Exception as e: logger.error(f"Error in egress loop: {e}")