Skip to content

Commit

Permalink
Invalidate sessions in the main thread (instead of goroutine)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszko committed Sep 5, 2024
1 parent c59ab4c commit 382b285
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions handlers/accesscontrol/access-control.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,11 @@ func (ac *AccessControlHandlersCollection) periodicRefreshIntervalCache(mapic mi
refreshIntervalCache.mux.Unlock()
ac.mutex.Unlock()

go func() {
glog.Infof("Invalidating sessions, count=%d", len(keysToInvalidate))
for _, key := range keysToInvalidate {
mapic.InvalidateAllSessions(key)
}
}()
glog.Infof("Invalidating sessions, count=%d", len(keysToInvalidate))
for _, key := range keysToInvalidate {
mapic.InvalidateAllSessions(key)
}
glog.Infof("Completed sessions invalidation, count=%d", len(keysToInvalidate))
}
}()
}
Expand Down

0 comments on commit 382b285

Please sign in to comment.