Skip to content

Commit 35437f8

Browse files
committed
fix: unset Zeroconf user on restore error to allow takeover
If we fail to restore the previous session when a user disconnects, unset the current Zeroconf user so that it can login again.
1 parent 97912f4 commit 35437f8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/daemon/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ func (app *App) withAppPlayer(ctx context.Context, appPlayerFunc func(context.Co
314314
newAppPlayer, err := appPlayerFunc(ctx)
315315
if err != nil {
316316
log.WithError(err).Errorf("failed restoring session after logout")
317+
318+
// unset the zeroconf user
319+
z.SetCurrentUser("")
317320
} else if newAppPlayer == nil {
318321
// unset the zeroconf user
319322
z.SetCurrentUser("")

0 commit comments

Comments
 (0)