diff --git a/plexwebsocket.py b/plexwebsocket.py index 9ffecb0..97386ff 100644 --- a/plexwebsocket.py +++ b/plexwebsocket.py @@ -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() diff --git a/setup.py b/setup.py index 886c57c..799a8c5 100644 --- a/setup.py +++ b/setup.py @@ -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',