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
1 changed files with 1 additions and 0 deletions

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)