From b83ea6be188b5821fe2d42300d6ac8c3fcfbb70f Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Wed, 8 Mar 2017 13:19:41 +0300 Subject: [PATCH] reconnection bug fix --- toxygen/profile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 61d2b6e..891312e 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -87,7 +87,7 @@ class Profile(basecontact.BaseContact, Singleton): super(Profile, self).set_status(status) if status is not None: self._tox.self_set_status(status) - else: + elif not self._waiting_for_reconnection: QtCore.QTimer.singleShot(50000, self.reconnect) def set_name(self, value): @@ -858,8 +858,6 @@ class Profile(basecontact.BaseContact, Singleton): self.update_filtration() def reconnect(self): - if self._waiting_for_reconnection: - return self._waiting_for_reconnection = False if self.status is None or all(list(map(lambda x: x.status is None, self._contacts))) and len(self._contacts): self._waiting_for_reconnection = True