Added TCP client reconnection on TCP socket drop

This commit is contained in:
Mark Qvist 2021-09-18 22:49:04 +02:00
parent 6362e04567
commit 65e8487b39
7 changed files with 84 additions and 8 deletions

View file

@ -463,7 +463,10 @@ class RNodeInterface(Interface):
except Exception as e:
self.online = False
RNS.log("A serial port error occurred, the contained exception was: "+str(e), RNS.LOG_ERROR)
RNS.log("The interface "+str(self.name)+" is now offline. Restart Reticulum to attempt reconnection.", RNS.LOG_ERROR)
RNS.log("The interface "+str(self)+" experienced an unrecoverable error and is being torn down. Restart Reticulum to attempt to open this interface again.", RNS.LOG_ERROR)
if RNS.Reticulum.panic_on_interface_error:
RNS.panic()
def __str__(self):
return "RNodeInterface["+self.name+"]"