1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-02-02 15:08:15 -05:00
Dmitry Podgorny 4344ee2a5a Don't clear saved account data in session_disconnect()
If connection loss occurs, it calls session_disconnect() eventually.
This function clears saved account data which is required for
reconnection. Therefore, when reconnect timer expires, we get errors:

02/06/2019 04:53:42: stderr: ERR: (profanity:17115): GLib-CRITICAL **:
                     04:53:42.305: g_key_file_has_group: assertion
                     'group_name != NULL' failed
02/06/2019 04:53:43: prof: ERR: Unable to reconnect, account no longer
                     exists: (null)

To solve it, don't clear the saved data in session_disconnect(). It will
be cleared properly on connection loss if reconnect timer is not
configured. But won't be cleared with /disconnect command.
So, after /disconnect the data will live in memory until the next
/connect.

Also, remove some copy-paste in connection loss path.
2019-06-03 13:21:52 +03:00
..
2019-05-02 17:01:55 +02:00
2019-01-22 11:31:45 +01:00
2019-02-20 11:53:40 +01:00
2019-01-22 11:31:45 +01:00
2019-01-22 11:31:45 +01:00
2019-04-10 17:12:31 +02:00
2019-04-10 17:12:31 +02:00
2019-04-24 01:08:38 +02:00
2019-01-22 11:31:45 +01:00