From 8ea3992ae5abd9b4449754203b3fb529a0c96e23 Mon Sep 17 00:00:00 2001 From: TheKysek Date: Mon, 29 Aug 2016 11:00:24 +0200 Subject: [PATCH] Remove unused code --- src/manager.py | 8 -------- src/shared.py | 5 ----- 2 files changed, 13 deletions(-) diff --git a/src/manager.py b/src/manager.py index b9d2fa0..68c499c 100644 --- a/src/manager.py +++ b/src/manager.py @@ -28,9 +28,6 @@ class Manager(threading.Thread): if now - self.last_cleaned_objects > 90: self.clean_objects() self.last_cleaned_objects = now - if now - self.last_cleaned_requested_objects > 3: - self.clean_requested_objects() - self.last_cleaned_requested_objects = now if now - self.last_cleaned_connections > 2: self.clean_connections() self.last_cleaned_connections = now @@ -52,11 +49,6 @@ class Manager(threading.Thread): del shared.objects[vector] logging.debug('Deleted expired object: {}'.format(base64.b16encode(vector).decode())) - @staticmethod - def clean_requested_objects(): - with shared.requested_objects_lock: - shared.requested_objects.difference_update(shared.objects.keys()) - @staticmethod def clean_connections(): hosts = set() diff --git a/src/shared.py b/src/shared.py index 4f32e6a..4492c16 100644 --- a/src/shared.py +++ b/src/shared.py @@ -23,11 +23,6 @@ header_length = 24 nonce_trials_per_byte = 1000 payload_length_extra_bytes = 1000 -# Longer synchronization, lower bandwidth usage, not really working -conserve_bandwidth = False -requested_objects = set() -requested_objects_lock = threading.Lock() - shutting_down = False vector_advertise_queue = queue.Queue()