mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
another session connect fix
This commit is contained in:
parent
b29df86339
commit
ffe249da3f
1 changed files with 30 additions and 34 deletions
16
tnc/sock.py
16
tnc/sock.py
|
@ -337,6 +337,12 @@ def process_tnc_commands(data):
|
|||
# set early disconnecting state so we can interrupt connection attempts
|
||||
static.ARQ_SESSION_STATE = "disconnecting"
|
||||
|
||||
# wait for disconnecting
|
||||
log.info(
|
||||
"[SCK] Waiting for disconnecting",
|
||||
callsign=static.DXCALLSIGN,
|
||||
command=received_json,
|
||||
)
|
||||
# set disconnect timeout to 15 seconds to avoid being stuck here if disconnect fails
|
||||
disconnect_timeout = time.time() + 15
|
||||
# wait until disconnected or timeout reached
|
||||
|
@ -373,16 +379,6 @@ def process_tnc_commands(data):
|
|||
# allow beacon transmission again
|
||||
static.BEACON_PAUSE = False
|
||||
|
||||
# finally an error - we shouldn't reach this point
|
||||
command_response("connect", False)
|
||||
log.error(
|
||||
"[SCK] Connect command execution error - shouldn't reach this point",
|
||||
e="connection exists",
|
||||
command=received_json,
|
||||
)
|
||||
# allow beacon transmission again
|
||||
static.BEACON_PAUSE = False
|
||||
|
||||
|
||||
# DISCONNECT ----------------------------------------------------------
|
||||
if received_json["type"] == "arq" and received_json["command"] == "disconnect":
|
||||
|
|
Loading…
Reference in a new issue