mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-04-09 15:13:51 +01:00
Compare commits
2 Commits
72d182a488
...
cbcca14481
Author | SHA1 | Date | |
---|---|---|---|
cbcca14481 | |||
f584d53835 |
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "vban-cmd"
|
name = "vban-cmd"
|
||||||
version = "2.4.2"
|
version = "2.4.3"
|
||||||
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"
|
||||||
|
@ -31,7 +31,7 @@ class Subscriber(threading.Thread):
|
|||||||
self.packet.framecounter = (
|
self.packet.framecounter = (
|
||||||
int.from_bytes(self.packet.framecounter, "little") + 1
|
int.from_bytes(self.packet.framecounter, "little") + 1
|
||||||
).to_bytes(4, "little")
|
).to_bytes(4, "little")
|
||||||
self.until_stopped(10)
|
self.wait_until_stopped(10)
|
||||||
except socket.gaierror as e:
|
except socket.gaierror as e:
|
||||||
self.logger.exception(f"{type(e).__name__}: {e}")
|
self.logger.exception(f"{type(e).__name__}: {e}")
|
||||||
raise VBANCMDConnectionError(
|
raise VBANCMDConnectionError(
|
||||||
@ -42,7 +42,7 @@ class Subscriber(threading.Thread):
|
|||||||
def stopped(self):
|
def stopped(self):
|
||||||
return self.stop_event.is_set()
|
return self.stop_event.is_set()
|
||||||
|
|
||||||
def until_stopped(self, timeout, period=0.2):
|
def wait_until_stopped(self, timeout, period=0.2):
|
||||||
must_end = time.time() + timeout
|
must_end = time.time() + timeout
|
||||||
while time.time() < must_end:
|
while time.time() < must_end:
|
||||||
if self.stopped():
|
if self.stopped():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user