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.
This commit is contained in:
Trong Huu Nguyen
2026-07-28 11:43:54 +02:00
parent 0d6d4a0dff
commit 29c7de357e
+1 -1
View File
@@ -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
}