Skip to content

Commit

Permalink
Move UNSUB message inside of try catch (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
shbatm authored Mar 20, 2023
1 parent 220a932 commit 63f846e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyisy/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def subscribe(self):
def unsubscribe(self):
"""Unsubscribe from the Event Stream."""
if self._subscribed and self._connected:
msg = self._create_message(strings.UNSUB_MSG)
try:
msg = self._create_message(strings.UNSUB_MSG)
self.write(msg)
except OSError as ex:
_LOGGER.error(
Expand Down

0 comments on commit 63f846e

Please sign in to comment.