mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
don't stop connecting when busy
This commit is contained in:
parent
b1f4dadcc6
commit
252fe73d68
|
@ -1997,25 +1997,10 @@ class DATA:
|
|||
)
|
||||
|
||||
# wait while timeout not reached and our busy state is busy
|
||||
channel_busy_timeout = time.time() + 15
|
||||
channel_busy_timeout = time.time() + 10
|
||||
while static.CHANNEL_BUSY and time.time() < channel_busy_timeout:
|
||||
threading.Event().wait(0.01)
|
||||
|
||||
# if channel busy timeout reached, stop connecting
|
||||
if time.time() > channel_busy_timeout:
|
||||
self.log.warning("[TNC] Channel busy, try again later...")
|
||||
static.ARQ_SESSION_STATE = "failed"
|
||||
self.send_data_to_socket_queue(
|
||||
freedata="tnc-message",
|
||||
arq="transmission",
|
||||
status="failed",
|
||||
reason="busy",
|
||||
mycallsign=str(self.mycallsign, 'UTF-8'),
|
||||
dxcallsign=str(self.dxcallsign, 'UTF-8'),
|
||||
)
|
||||
static.ARQ_SESSION_STATE = "disconnected"
|
||||
return False
|
||||
|
||||
self.enqueue_frame_for_tx([connection_frame], c2_mode=FREEDV_MODE.datac0.value, copies=1, repeat_delay=0)
|
||||
|
||||
timeout = time.time() + 3
|
||||
|
|
Loading…
Reference in a new issue