From a5490b9f281acf6d826272b5c869c5f95665e44a Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 18 Aug 2019 00:54:52 -0500 Subject: [PATCH] reduced initial block cleanup timer count --- onionr/communicator/__init__.py | 2 +- onionr/httpapi/directconnections/__init__.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/onionr/communicator/__init__.py b/onionr/communicator/__init__.py index 70f668dc..72816fb3 100755 --- a/onionr/communicator/__init__.py +++ b/onionr/communicator/__init__.py @@ -164,7 +164,7 @@ class OnionrCommunicatorDaemon: # Adjust initial timer triggers peerPoolTimer.count = (peerPoolTimer.frequency - 1) cleanupTimer.count = (cleanupTimer.frequency - 60) - blockCleanupTimer.count = (blockCleanupTimer.frequency - 5) + blockCleanupTimer.count = (blockCleanupTimer.frequency - 2) shared_state.add(self) diff --git a/onionr/httpapi/directconnections/__init__.py b/onionr/httpapi/directconnections/__init__.py index 7a626303..80e3b82a 100644 --- a/onionr/httpapi/directconnections/__init__.py +++ b/onionr/httpapi/directconnections/__init__.py @@ -51,10 +51,10 @@ class DirectConnectionManagement: resp = "pending" if pubkey in communicator.direct_connection_clients: resp = communicator.direct_connection_clients[pubkey] - - """Spawn a thread that will create the client and eventually add it to the - communicator.active_services - """ - threading.Thread(target=onionrservices.OnionrServices().create_client, args=[pubkey, communicator], daemon=True).start() + else: + """Spawn a thread that will create the client and eventually add it to the + communicator.active_services + """ + threading.Thread(target=onionrservices.OnionrServices().create_client, args=[pubkey, communicator], daemon=True).start() return Response(resp) \ No newline at end of file