mirror of
https://github.com/craigerl/aprsd.git
synced 2025-07-31 12:52:24 -04:00
Ensure Keepalive doesn't reset client at startup
This patch ensures that the keepalive thread doesn't try and reset/restart the aprs connection at startup.
This commit is contained in:
parent
140fa4ace4
commit
ef206b1283
@ -82,7 +82,12 @@ class KeepAliveThread(APRSDThread):
|
|||||||
|
|
||||||
# check the APRS connection
|
# check the APRS connection
|
||||||
cl = client.factory.create()
|
cl = client.factory.create()
|
||||||
if not cl.is_alive():
|
# Reset the connection if it's dead and this isn't our
|
||||||
|
# First time through the loop.
|
||||||
|
# The first time through the loop can happen at startup where
|
||||||
|
# The keepalive thread starts before the client has a chance
|
||||||
|
# to make it's connection the first time.
|
||||||
|
if not cl.is_alive() and self.cntr > 0:
|
||||||
LOG.error(f"{cl.__class__.__name__} is not alive!!! Resetting")
|
LOG.error(f"{cl.__class__.__name__} is not alive!!! Resetting")
|
||||||
client.factory.create().reset()
|
client.factory.create().reset()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user