Skip to content

Commit f56e959

Browse files
committed
Handle clean shutdown when task not running
1 parent c23dacb commit f56e959

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

plexwebsocket.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,5 @@ def player_event(self, msg):
153153
def close(self):
154154
"""Close the listening websocket."""
155155
self._active = False
156-
self._current_task.cancel()
156+
if self._current_task is not None:
157+
self._current_task.cancel()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
with open('README.md') as f:
44
long_description = f.read()
55

6-
VERSION="0.0.6"
6+
VERSION="0.0.7"
77

88
setup(
99
name='plexwebsocket',

0 commit comments

Comments
 (0)