From ecf22cb4a4261b1fbbe893a0ec1bf185fcc02db8 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 30 Jul 2014 17:24:41 +0200 Subject: Fix all the connect() reconnect() stuff The /reconnect command should now properly work everytime. --- src/tabs/rostertab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/tabs') diff --git a/src/tabs/rostertab.py b/src/tabs/rostertab.py index 3d01046b..cb80007a 100644 --- a/src/tabs/rostertab.py +++ b/src/tabs/rostertab.py @@ -241,7 +241,10 @@ class RosterInfoTab(Tab): """ /reconnect """ - self.core.disconnect(reconnect=True) + if self.core.xmpp.is_connected(): + self.core.disconnect(reconnect=True) + else: + self.core.xmpp.connect() def command_disconnect(self, args=None): """ -- cgit v1.2.3