diff --git a/pyproject.toml b/pyproject.toml index 779e554..67bdbbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vban-cmd" -version = "2.4.9" +version = "2.4.10" description = "Python interface for the VBAN RT Packet Service (Sendtext)" authors = ["onyx-and-iris "] license = "MIT" diff --git a/vban_cmd/vbancmd.py b/vban_cmd/vbancmd.py index 7522fb3..e7f35ce 100644 --- a/vban_cmd/vbancmd.py +++ b/vban_cmd/vbancmd.py @@ -51,6 +51,7 @@ class VbanCmd(metaclass=ABCMeta): self._ldirty = False self._script = str() self.stop_event = None + self.producer = None @abstractmethod def __str__(self): @@ -231,8 +232,9 @@ class VbanCmd(metaclass=ABCMeta): if not self.stopped(): self.logger.debug("events thread shutdown started") self.stop_event.set() - for t in (self.producer, self.subscriber): - t.join() + if self.producer is not None: + for t in (self.producer, self.subscriber): + t.join() [sock.close() for sock in self.socks] self.logger.info(f"{type(self).__name__}: Successfully logged out of {self}")