mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-23 21:16:14 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user