mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-01-18 16:30:33 +00:00
Improved LocalInterface detach
This commit is contained in:
parent
1709cd929a
commit
b8aa6a3e44
@ -246,12 +246,14 @@ class LocalClientInterface(Interface):
|
|||||||
self.detached = True
|
self.detached = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.socket.shutdown(socket.SHUT_RDWR)
|
if self.socket != None:
|
||||||
|
self.socket.shutdown(socket.SHUT_RDWR)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while shutting down socket for "+str(self)+": "+str(e))
|
RNS.log("Error while shutting down socket for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.socket.close()
|
if self.socket != None:
|
||||||
|
self.socket.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while closing socket for "+str(self)+": "+str(e))
|
RNS.log("Error while closing socket for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user