From 263dc6bae573ca9cfa95e8eb52012835bd048d86 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 1 Nov 2026 17:37:52 +0100 Subject: [PATCH] RPC error handling --- RNS/Reticulum.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 3f51ab08..2cd7bfff 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -1495,10 +1495,8 @@ class Reticulum: identity_hash = call["identity_hash"] if operation == "retain": self.rpc_return(conn, self._retain_identity(identity_hash)) - conn.close() - - except Exception as e: - RNS.log("An error ocurred while handling RPC call from local client: "+str(e), RNS.LOG_ERROR) + except Exception as e: RNS.log("An error ocurred while handling RPC call from local client: "+str(e), RNS.LOG_ERROR) + finally: conn.close() def get_rpc_client(self): return multiprocessing.connection.Client(self.rpc_addr, family=self.rpc_type, authkey=self.rpc_key)