Skip to content

Commit

Permalink
fix: correct expToWebhookConfig cache locking
Browse files Browse the repository at this point in the history
  • Loading branch information
stoksc committed Oct 2, 2024
1 parent 25ca6d0 commit f5a7e38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/internal/webhooks/postgres_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ func (l *WebhookManager) getWebhookConfig(ctx context.Context, expID *int) (*exp
return nil, nil
}

l.mu.RLock()
defer l.mu.RUnlock()
l.mu.Lock()
defer l.mu.Unlock()

if config, ok := l.expToWebhookConfig[*expID]; ok {
return config, nil
Expand Down

0 comments on commit f5a7e38

Please sign in to comment.