diff --git a/pykirdy/driver/kirdy.py b/pykirdy/driver/kirdy.py index 48df3d1..cb7d653 100644 --- a/pykirdy/driver/kirdy.py +++ b/pykirdy/driver/kirdy.py @@ -759,7 +759,11 @@ class Kirdy: Enqueue a task to be handled by the handler. """ if self.connected(): - self._task_queue.put_nowait(lambda: awaitable_fn) + try: + self._task_queue.put_nowait(lambda: awaitable_fn) + return True + except asyncio.queues.QueueFull: + return False else: raise ConnectionError