3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

fix a spurious error logline

unregistering an always-on client would produce
"attempting to persist logged-out client : x"
because the client was always-on, but also being ejected
This commit is contained in:
Shivaram Lingamneni 2020-03-02 01:54:40 -05:00
parent d5f68215e1
commit e7c1800893

View File

@ -1152,6 +1152,7 @@ func (am *AccountManager) Unregister(account string) error {
}
for _, client := range clients {
if config.Accounts.RequireSasl.Enabled {
client.Logout()
client.Quit(client.t("You are no longer authorized to be on this server"), nil)
// destroy acquires a semaphore so we can't call it while holding a lock
go client.destroy(nil)