only handle exception if still active
This commit is contained in:
parent
f5bb5ee877
commit
14f426afd4
1 changed files with 8 additions and 6 deletions
|
@ -85,13 +85,15 @@ class LocalNodesBase(Thread):
|
||||||
if data:
|
if data:
|
||||||
self.update_node(data)
|
self.update_node(data)
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
now = time.mktime(time.localtime())
|
if self._active:
|
||||||
if now - last > 60:
|
now = time.mktime(time.localtime())
|
||||||
last = now
|
if now - last > 60:
|
||||||
thread.start_new_thread(self.send, ())
|
last = now
|
||||||
|
thread.start_new_thread(self.send, ())
|
||||||
except:
|
except:
|
||||||
logger.debug('receive failed. restart later', exc_info=1)
|
if self._active:
|
||||||
time.sleep(10)
|
logger.debug('receive failed. restart later', exc_info=1)
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
def verify(self, data):
|
def verify(self, data):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue