mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-11-19 14:36:34 -05:00
Fixed RPC error handling
This commit is contained in:
parent
9b6678b317
commit
53dc223a03
1 changed files with 2 additions and 1 deletions
|
|
@ -1448,6 +1448,7 @@ class Reticulum:
|
|||
|
||||
def rpc_loop(self):
|
||||
while RNS.Transport._should_run:
|
||||
conn = None
|
||||
try:
|
||||
conn = self.rpc_listener.accept()
|
||||
call = mp.unpackb(conn.recv_bytes())
|
||||
|
|
@ -1528,7 +1529,7 @@ class Reticulum:
|
|||
if operation == "retain": self.rpc_return(conn, self._retain_identity(identity_hash))
|
||||
|
||||
except Exception as e: RNS.log("An error ocurred while handling RPC call from local client: "+str(e), RNS.LOG_ERROR)
|
||||
finally: conn.close()
|
||||
finally: conn.close() if conn else None
|
||||
|
||||
def get_rpc_client(self): return multiprocessing.connection.Client(self.rpc_addr, family=self.rpc_type, authkey=self.rpc_key)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue