mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-10-01 03:15:44 -04:00
Improved log output from local interfaces
This commit is contained in:
parent
dc36644a1e
commit
e9e2ffbe0d
@ -106,7 +106,7 @@ class LocalClientInterface(Interface):
|
|||||||
data_buffer = data_buffer+bytes([byte])
|
data_buffer = data_buffer+bytes([byte])
|
||||||
else:
|
else:
|
||||||
RNS.log("Socket for "+str(self)+" was closed, tearing down interface", RNS.LOG_VERBOSE)
|
RNS.log("Socket for "+str(self)+" was closed, tearing down interface", RNS.LOG_VERBOSE)
|
||||||
self.teardown()
|
self.teardown(nowarning=True)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ class LocalClientInterface(Interface):
|
|||||||
RNS.log("Tearing down "+str(self), RNS.LOG_ERROR)
|
RNS.log("Tearing down "+str(self), RNS.LOG_ERROR)
|
||||||
self.teardown()
|
self.teardown()
|
||||||
|
|
||||||
def teardown(self):
|
def teardown(self, nowarning=False):
|
||||||
self.online = False
|
self.online = False
|
||||||
self.OUT = False
|
self.OUT = False
|
||||||
self.IN = False
|
self.IN = False
|
||||||
@ -127,6 +127,7 @@ class LocalClientInterface(Interface):
|
|||||||
if self in RNS.Transport.local_client_interfaces:
|
if self in RNS.Transport.local_client_interfaces:
|
||||||
RNS.Transport.local_client_interfaces.remove(self)
|
RNS.Transport.local_client_interfaces.remove(self)
|
||||||
|
|
||||||
|
if nowarning == False:
|
||||||
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)
|
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:
|
if RNS.Reticulum.panic_on_interface_error:
|
||||||
RNS.panic()
|
RNS.panic()
|
||||||
|
Loading…
Reference in New Issue
Block a user