Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <[email protected]>
  • Loading branch information
JorTurFer committed Nov 4, 2024
1 parent a072763 commit c6811c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scaling/cache/scalers_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ func (c *ScalersCache) GetPushScalers() []scalers.PushScaler {

// Close closes all scalers in the cache
func (c *ScalersCache) Close(ctx context.Context) {
c.mutex.RLock()
defer c.mutex.RUnlock()
c.mutex.Lock()
scalers := c.Scalers
c.Scalers = nil
c.mutex.Unlock()
for _, s := range scalers {
err := s.Scaler.Close(ctx)
if err != nil {
Expand Down

0 comments on commit c6811c9

Please sign in to comment.