From 29c7de357ee142fe810d35688537e18d14175c03 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Tue, 28 Jul 2026 11:10:50 +0200 Subject: [PATCH] fix(handler): scope the background session deletion error The retry callback assigned to the enclosing if-scoped err instead of declaring its own. Nothing read that variable after the handler returned, so behaviour is unchanged. --- pkg/handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index 422a748..658b5da 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -430,7 +430,7 @@ func (s *Standalone) LogoutFrontChannel(w http.ResponseWriter, r *http.Request) go func() { // attempt background delete with retries err := retry.Do(context.Background(), func(ctx context.Context) error { - err = s.SessionManager.DeleteForExternalID(ctx, sid) + err := s.SessionManager.DeleteForExternalID(ctx, sid) if err == nil || errors.Is(err, session.ErrNotFound) { return nil }