Skip to content

fix: unset Zeroconf user on restore error to allow takeover#261

Merged
devgianlu merged 1 commit intomasterfrom
fix-240
Nov 30, 2025
Merged

fix: unset Zeroconf user on restore error to allow takeover#261
devgianlu merged 1 commit intomasterfrom
fix-240

Conversation

@devgianlu
Copy link
Copy Markdown
Owner

@devgianlu devgianlu commented Nov 30, 2025

Fixes #240, supersedes #258

If we fail to restore the previous session when a user disconnects, unset the current Zeroconf user so that it can login again.

Without this, we would just return without actually attempting:

if z.currentUser == username || z.authenticatingUser == username {
z.userLock.Unlock()
writer.WriteHeader(http.StatusOK)
return json.NewEncoder(writer).Encode(AddUserResponse{
Status: 101,
StatusString: "OK",
SpotifyError: 0,
})
}

If we fail to restore the previous session when a user disconnects,
unset the current Zeroconf user so that it can login again.
@devgianlu devgianlu merged commit 35437f8 into master Nov 30, 2025
8 checks passed
@devgianlu devgianlu deleted the fix-240 branch November 30, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stuck after "Failed restoring session after logout"

1 participant