about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2019-06-03 13:11:41 +0300
committerDmitry Podgorny <pasis.ua@gmail.com>2019-06-03 13:21:52 +0300
commit4344ee2a5a5f4139d45edace5b1d22b159358f25 (patch)
treea8ba3127c01134f1490e954aa189567df4a884c2 /src/command
parent5b4277840a9822945ccdb552a0a56cc3a62c49f3 (diff)
downloadprofani-tty-4344ee2a5a5f4139d45edace5b1d22b159358f25.tar.gz
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.
Diffstat (limited to 'src/command')
0 files changed, 0 insertions, 0 deletions