Skip to content

Commit

Permalink
Add missing lock
Browse files Browse the repository at this point in the history
  • Loading branch information
rthellend committed Nov 8, 2024
1 parent e2f794b commit 5080731
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,8 @@ func (p *Proxy) baseTLSConfig() *tls.Config {
}

func (p *Proxy) getCertFromConfig(serverName string) (*tls.Certificate, error) {
p.mu.RLock()
defer p.mu.RUnlock()
for _, c := range p.cfg.TLSCertificates {
if slices.IndexFunc(c.ServerNames, func(v string) bool {
if v == serverName {
Expand Down

0 comments on commit 5080731

Please sign in to comment.