Skip to content

Commit

Permalink
Fix BAD_CREDENTIALS / UNCONFIGURED race
Browse files Browse the repository at this point in the history
  • Loading branch information
smweber committed Jan 10, 2024
1 parent 4602d8b commit de8c8d9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions user.go
Expand Up @@ -518,7 +518,6 @@ func (br *SignalBridge) StartUsers() {
br.ZLog.Debug().Msg("Starting users")

usersWithToken := br.GetAllLoggedInUsers()
numUsersStarting := 0
for _, u := range usersWithToken {
device := u.populateSignalDevice()
if device == nil || !device.IsLoggedIn() {
Expand All @@ -527,9 +526,8 @@ func (br *SignalBridge) StartUsers() {
continue
}
go u.Connect()
numUsersStarting++
}
if numUsersStarting == 0 {
if len(usersWithToken) == 0 {
br.SendGlobalBridgeState(status.BridgeState{StateEvent: status.StateUnconfigured}.Fill(nil))
}

Expand Down

0 comments on commit de8c8d9

Please sign in to comment.