mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-22 01:20:59 -05:00
Start keepalive thread first
This patch changes the order of the threads starting. The Keepalive thread's job is to test the aprsis/kiss client to see if it's up and running, and then issue a reset if it's down. On SIGINT, the keepalive might issue that reset in the middle of a shutdown, which might cause things to hang when everything should be shutting down. Making the KeepaliveThread first, means it will be the first to be shut down as well, preventing the next loop from resetting the client.
This commit is contained in:
parent
34311f0fbd
commit
859f904602
@ -94,6 +94,9 @@ def server(ctx, flush):
|
||||
packets.WatchList().load()
|
||||
packets.SeenList().load()
|
||||
|
||||
keepalive = threads.KeepAliveThread()
|
||||
keepalive.start()
|
||||
|
||||
rx_thread = rx.APRSDPluginRXThread(
|
||||
packet_queue=threads.packet_queue,
|
||||
)
|
||||
@ -105,9 +108,6 @@ def server(ctx, flush):
|
||||
|
||||
packets.PacketTrack().restart()
|
||||
|
||||
keepalive = threads.KeepAliveThread()
|
||||
keepalive.start()
|
||||
|
||||
if CONF.rpc_settings.enabled:
|
||||
rpc = rpc_server.APRSDRPCThread()
|
||||
rpc.start()
|
||||
|
@ -479,6 +479,10 @@ def webchat(ctx, flush, port):
|
||||
packets.WatchList()
|
||||
packets.SeenList()
|
||||
|
||||
keepalive = threads.KeepAliveThread()
|
||||
LOG.info("Start KeepAliveThread")
|
||||
keepalive.start()
|
||||
|
||||
socketio = init_flask(loglevel, quiet)
|
||||
rx_thread = rx.APRSDPluginRXThread(
|
||||
packet_queue=threads.packet_queue,
|
||||
@ -490,9 +494,6 @@ def webchat(ctx, flush, port):
|
||||
)
|
||||
process_thread.start()
|
||||
|
||||
keepalive = threads.KeepAliveThread()
|
||||
LOG.info("Start KeepAliveThread")
|
||||
keepalive.start()
|
||||
LOG.info("Start socketio.run()")
|
||||
socketio.run(
|
||||
flask_app,
|
||||
|
Loading…
Reference in New Issue
Block a user