From 9b5d768819b8eebdb6d5884427866d75365054ff Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 30 Jan 2018 20:36:59 +0300 Subject: [PATCH] reconnect bug fixed --- toxygen/profile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 204419a..2107878 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -870,8 +870,11 @@ class Profile(basecontact.BaseContact, Singleton): Recreate tox instance :param restart: method which calls restart and returns new tox instance """ - for friend in self._contacts: - self.friend_exit(friend.number) + for contact in self._contacts: + if type(contact) is Friend: + self.friend_exit(contact.number) + else: + self.leave_gc(contact.number) self._call.stop() del self._call del self._tox