Commit 847d8c92 authored by Andrey Gursky's avatar Andrey Gursky

Fix exception on reconnect

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'
parent e70ea74f
Pipeline #2725 passed with stages
in 3 minutes and 46 seconds
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment