mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2024-11-15 17:10:46 +00:00
ensure we don't try to join a thread that wasn't created
(in the event of a timeout error)
This commit is contained in:
parent
f863723a4e
commit
87a1d62414
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "vban-cmd"
|
name = "vban-cmd"
|
||||||
version = "2.4.9"
|
version = "2.4.10"
|
||||||
description = "Python interface for the VBAN RT Packet Service (Sendtext)"
|
description = "Python interface for the VBAN RT Packet Service (Sendtext)"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -51,6 +51,7 @@ class VbanCmd(metaclass=ABCMeta):
|
|||||||
self._ldirty = False
|
self._ldirty = False
|
||||||
self._script = str()
|
self._script = str()
|
||||||
self.stop_event = None
|
self.stop_event = None
|
||||||
|
self.producer = None
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
@ -231,8 +232,9 @@ class VbanCmd(metaclass=ABCMeta):
|
|||||||
if not self.stopped():
|
if not self.stopped():
|
||||||
self.logger.debug("events thread shutdown started")
|
self.logger.debug("events thread shutdown started")
|
||||||
self.stop_event.set()
|
self.stop_event.set()
|
||||||
for t in (self.producer, self.subscriber):
|
if self.producer is not None:
|
||||||
t.join()
|
for t in (self.producer, self.subscriber):
|
||||||
|
t.join()
|
||||||
[sock.close() for sock in self.socks]
|
[sock.close() for sock in self.socks]
|
||||||
self.logger.info(f"{type(self).__name__}: Successfully logged out of {self}")
|
self.logger.info(f"{type(self).__name__}: Successfully logged out of {self}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user