Skip to content

Commit

Permalink
Fix issue with stop re-call failing the caller (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
george-zubrienko authored Mar 12, 2024
1 parent fc6126f commit 163465d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adapta/logs/_async_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ def stop(self):
Stops the async listener and flushes the buffer out to all handlers.
"""
with self._lock:
self._listener.stop()
self._is_active = False
if self._is_active:
self._listener.stop()
self._is_active = False

def __enter__(self):
self.start()
Expand Down

0 comments on commit 163465d

Please sign in to comment.