...
 
Commits (1)
  • Andrey Gursky's avatar
    Fix exception on reconnect · 847d8c92
    Andrey Gursky authored
    This is a regression from 5fa56684
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 662, in <lambda>
        func_fdtransform = lambda _, cond, *data: callback(channel, cond, *data)
      File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/idlequeue.py", line 545, in _process_events
        return IdleQueue._process_events(self, fd, flags)
      File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/idlequeue.py", line 407, in _process_events
        obj.pollend()
      File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports_nb.py", line 477, in pollend
        (self.server, self.port))
      File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/transports_nb.py", line 216, in _on_connect_failure
        self.on_connect_failure(err_message=err_message)
      File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/client_nb.py", line 325, in _try_next_ip
        self.disconnect(msg)
      File "/home/andrey/progs/python-nbxmpp.git/nbxmpp/client_nb.py", line 174, in disconnect
        self.on_connect_failure()
      File "/home/andrey/progs/gajim.git/gajim/common/connection.py", line 1035, in _connect_to_next_host
        self._connect_to_next_host(retry)
      File "/home/andrey/progs/gajim.git/gajim/common/connection.py", line 1005, in _connect_to_next_host
        self.disconnectedReconnCB()
      File "/home/andrey/progs/gajim.git/gajim/common/connection.py", line 673, in disconnectedReconnCB
        if not self.connection.resume_supported:
    AttributeError: 'NoneType' object has no attribute 'resume_supported'
    847d8c92
......@@ -670,7 +670,7 @@ class Connection(CommonConnection, ConnectionHandlers):
self.old_show = app.SHOW_LIST[self.connected]
self.connected = 0
if not self.on_purpose:
if not self.connection.resume_supported:
if self.connection is not None and not self.connection.resume_supported:
app.nec.push_incoming_event(OurShowEvent(None, conn=self,
show='offline'))
else:
......