mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-12-17 01:14:21 -05:00
Cleanup
This commit is contained in:
parent
fa6de7ff79
commit
309f1999e7
1 changed files with 5 additions and 6 deletions
|
|
@ -430,7 +430,8 @@ class RNodeInterface(Interface):
|
||||||
|
|
||||||
self.detect()
|
self.detect()
|
||||||
if not self.use_ble:
|
if not self.use_ble:
|
||||||
sleep(0.2)
|
if self.use_tcp: sleep(1.0)
|
||||||
|
else: sleep(0.2)
|
||||||
else:
|
else:
|
||||||
ble_detect_timeout = 5
|
ble_detect_timeout = 5
|
||||||
detect_time = time.time()
|
detect_time = time.time()
|
||||||
|
|
@ -1400,8 +1401,8 @@ class BLEConnection():
|
||||||
|
|
||||||
class TCPConnection():
|
class TCPConnection():
|
||||||
TARGET_PORT = 7633
|
TARGET_PORT = 7633
|
||||||
CONNECT_TIMEOUT = 2.5
|
CONNECT_TIMEOUT = 5.0
|
||||||
INITIAL_CONNECT_TIMEOUT = 2.5
|
INITIAL_CONNECT_TIMEOUT = 5.0
|
||||||
RECONNECT_WAIT = 4.0
|
RECONNECT_WAIT = 4.0
|
||||||
|
|
||||||
TCP_USER_TIMEOUT = 24
|
TCP_USER_TIMEOUT = 24
|
||||||
|
|
@ -1473,9 +1474,7 @@ class TCPConnection():
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
try:
|
try:
|
||||||
if self.socket: self.socket.close()
|
if self.socket: self.socket.close()
|
||||||
except Exception as e:
|
except Exception as e: RNS.log(f"Error while disconnecting TCP socket on cleanup for {self.owner}", RNS.LOG_ERROR)
|
||||||
RNS.log(f"Error while disconnecting TCP socket on cleanup for {self.owner}", RNS.LOG_ERROR)
|
|
||||||
|
|
||||||
self.should_run = False
|
self.should_run = False
|
||||||
|
|
||||||
def initial_connect(self):
|
def initial_connect(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue