X-Git-Url: http://git.treefish.org/~alex/mtxbot.git/blobdiff_plain/b07be8cb62cc873d0c069c6410fdb0275620f66e..3bc600aca376ed27dd4466da362b62b098f7c3ec:/src/presence.py diff --git a/src/presence.py b/src/presence.py index 0a7b1a1..4c7e966 100644 --- a/src/presence.py +++ b/src/presence.py @@ -21,6 +21,11 @@ class Presence: self._log(logging.INFO, "Presence stopped") def stop(self): + asyncio.get_running_loop().call_soon_threadsafe( + Presence._do_stop, self + ) + + def _do_stop(self): self._stop = True fifo = -1 try: