Commit 25494124 authored by Philipp Hörist's avatar Philipp Hörist

Client: Set client state before our-show event

parent dea91b16
Pipeline #5228 passed with stages
in 3 minutes and 40 seconds
......@@ -196,6 +196,7 @@ class Client(ConnectionHandlers):
def _on_disconnected(self, _client, _signal_name):
log.info('Disconnect %s', self._account)
self._set_state(ClientState.DISCONNECTED)
domain, error, _text = self._client.get_error()
if domain == StreamError.BAD_CERTIFICATE:
......@@ -232,14 +233,13 @@ class Client(ConnectionHandlers):
OurShowEvent(None, conn=self, show='error'))
else:
self._status = 'offline'
self.get_module('Chatstate').enabled = False
app.nec.push_incoming_event(OurShowEvent(
None, conn=self, show='offline'))
self._after_disconnect()
def _after_disconnect(self):
log.info('Set state disconnected')
self._set_state(ClientState.DISCONNECTED)
self._disable_reconnect_timer()
app.interface.music_track_changed(None, None, self._account)
......
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