# HG changeset patch # User Charly COSTE # Date 1267913957 -3600 # Node ID 45065f6f674c70cbff4335d7887b67bd1ef0fdc0 # Parent d527d7b75f56473bece5ddd8144444408dd3092f (muc) ignore NotConnected exception in leave method Signed-off-by: Charly COSTE diff --git a/muc.py b/muc.py --- a/muc.py +++ b/muc.py @@ -154,7 +154,10 @@ class muc: self.xmpp_c.lock.acquire() self.auto_reconnect = False s = xmpp.protocol.Presence(to=self.jid, typ='unavailable', status=message) - self._send(s) + try: + self._send(s) + except self.NotConnected: + pass self.connected = False self.xmpp_c.lock.release()