Timing tweaks
This commit is contained in:
parent
33b0f294ef
commit
71a2dd95f1
|
@ -11,7 +11,7 @@ class Advertiser(threading.Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while True:
|
while True:
|
||||||
time.sleep(0.6)
|
time.sleep(0.4)
|
||||||
self._advertise_vectors()
|
self._advertise_vectors()
|
||||||
self._advertise_addresses()
|
self._advertise_addresses()
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Connection(threading.Thread):
|
||||||
self._connect()
|
self._connect()
|
||||||
if self.status != 'connected':
|
if self.status != 'connected':
|
||||||
return
|
return
|
||||||
self.s.settimeout(1)
|
self.s.settimeout(0.5)
|
||||||
if not self.server:
|
if not self.server:
|
||||||
self.send_queue.put(message.Version(self.host, self.port))
|
self.send_queue.put(message.Version(self.host, self.port))
|
||||||
while True:
|
while True:
|
||||||
|
@ -95,9 +95,7 @@ class Connection(threading.Thread):
|
||||||
logging.debug('{}:{} <- {}'.format(self.host, self.port, structure.Object.from_message(m)))
|
logging.debug('{}:{} <- {}'.format(self.host, self.port, structure.Object.from_message(m)))
|
||||||
else:
|
else:
|
||||||
logging.debug('{}:{} <- {}'.format(self.host, self.port, m))
|
logging.debug('{}:{} <- {}'.format(self.host, self.port, m))
|
||||||
self.s.settimeout(60)
|
|
||||||
self.s.sendall(m.to_bytes())
|
self.s.sendall(m.to_bytes())
|
||||||
self.s.settimeout(1)
|
|
||||||
|
|
||||||
def _send_big_inv(self):
|
def _send_big_inv(self):
|
||||||
with shared.objects_lock:
|
with shared.objects_lock:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user