Remove unused code
This commit is contained in:
parent
4f608ba75a
commit
8ea3992ae5
|
@ -28,9 +28,6 @@ class Manager(threading.Thread):
|
||||||
if now - self.last_cleaned_objects > 90:
|
if now - self.last_cleaned_objects > 90:
|
||||||
self.clean_objects()
|
self.clean_objects()
|
||||||
self.last_cleaned_objects = now
|
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:
|
if now - self.last_cleaned_connections > 2:
|
||||||
self.clean_connections()
|
self.clean_connections()
|
||||||
self.last_cleaned_connections = now
|
self.last_cleaned_connections = now
|
||||||
|
@ -52,11 +49,6 @@ class Manager(threading.Thread):
|
||||||
del shared.objects[vector]
|
del shared.objects[vector]
|
||||||
logging.debug('Deleted expired object: {}'.format(base64.b16encode(vector).decode()))
|
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
|
@staticmethod
|
||||||
def clean_connections():
|
def clean_connections():
|
||||||
hosts = set()
|
hosts = set()
|
||||||
|
|
|
@ -23,11 +23,6 @@ header_length = 24
|
||||||
nonce_trials_per_byte = 1000
|
nonce_trials_per_byte = 1000
|
||||||
payload_length_extra_bytes = 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
|
shutting_down = False
|
||||||
|
|
||||||
vector_advertise_queue = queue.Queue()
|
vector_advertise_queue = queue.Queue()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user