Skip to content

Commit

Permalink
fixed noficationController.close()
Browse files Browse the repository at this point in the history
  • Loading branch information
max-Elk committed Mar 9, 2023
1 parent 81c67ab commit 93d6abd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions elkpy/notificationcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ def _run_notification_loop(loop):
loop.run_forever()

def close(self):
self.loop.call_soon_threadsafe(self.loop.stop)
self.notification_thread.join()
if self._async:
return
else:
self.loop.call_soon_threadsafe(self.loop.stop)
self.notification_thread.join()

def __del__(self):
self.close()
Expand Down

0 comments on commit 93d6abd

Please sign in to comment.