Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
Merge branch 'go/logout-bridge'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Feb 22, 2024
2 parents 7f72542 + 0cd9c9f commit aa09f47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,10 @@ func (user *User) saveSignalID(ctx context.Context, id uuid.UUID, number string)
Stringer("signal_uuid", id).
Msg("Another user is already logged in with same UUID, logging out previous user")
existingUser.Lock()
existingUser.clearKeysAndDisconnect(ctx)
existingUser.Client = nil
if existingUser.Client != nil {
existingUser.clearKeysAndDisconnect(ctx)
existingUser.Client = nil
}
existingUser.handleLoggedOutNoLock(ctx)
existingUser.Unlock()
if managementRoom := existingUser.GetManagementRoomID(); managementRoom != "" {
Expand Down

0 comments on commit aa09f47

Please sign in to comment.