Skip to content

Commit

Permalink
Handle clean shutdown when task not running
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlawren committed Mar 29, 2020
1 parent c23dacb commit f56e959
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion plexwebsocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,5 @@ def player_event(self, msg):
def close(self):
"""Close the listening websocket."""
self._active = False
self._current_task.cancel()
if self._current_task is not None:
self._current_task.cancel()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with open('README.md') as f:
long_description = f.read()

VERSION="0.0.6"
VERSION="0.0.7"

setup(
name='plexwebsocket',
Expand Down

0 comments on commit f56e959

Please sign in to comment.