GODT-2041: Crash after factory reset

I forgot to remove the user from the users map during factory reset.
This meant the (deleted) would attempt to be closed during teardown.
This commit is contained in:
James Houlahan
2022-11-28 19:58:10 +01:00
parent b902f1490f
commit ae7ae2886f
3 changed files with 23 additions and 4 deletions

View File

@ -119,7 +119,6 @@ func (bridge *Bridge) handleUserRefreshed(ctx context.Context, user *user.User)
func (bridge *Bridge) handleUserDeauth(ctx context.Context, user *user.User) {
safe.Lock(func() {
defer delete(bridge.users, user.ID())
bridge.logoutUser(ctx, user, false, false)
}, bridge.usersLock)
}