Do not log invalid reson for disconnect

This commit is contained in:
TheKysek 2017-05-25 11:52:48 +02:00
parent de260cfa96
commit 6e69c3d2b0
No known key found for this signature in database
GPG Key ID: 50D9AF00D0B1C497
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ class Connection(threading.Thread):
'Disconnecting from {}:{}. Reason: time.time() - self.last_message_received > shared.timeout'.format(
self.host, self.port))
self.status = 'disconnecting'
if time.time() - self.last_message_received > 30 and self.status != 'fully_established':
if time.time() - self.last_message_received > 30 and self.status != 'fully_established'and self.status != 'disconnecting':
logging.debug(
'Disconnecting from {}:{}. Reason: time.time() - self.last_message_received > 30 and self.status != \'fully_established\''.format(
self.host, self.port))