Fix variable capture in ECH rotation goroutine

Co-authored-by: mholt <1128849+mholt@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-24 23:45:22 +00:00
parent 5fdc6c5e76
commit 48bb0365e5

View file

@ -428,10 +428,10 @@ func (t *TLS) Start() error {
case <-time.After(1 * time.Hour): case <-time.After(1 * time.Hour):
// ensure old keys are rotated out // ensure old keys are rotated out
t.EncryptedClientHello.configsMu.Lock() t.EncryptedClientHello.configsMu.Lock()
err = t.EncryptedClientHello.rotateECHKeys(t.ctx, echLogger, false) rotateErr := t.EncryptedClientHello.rotateECHKeys(t.ctx, echLogger, false)
t.EncryptedClientHello.configsMu.Unlock() t.EncryptedClientHello.configsMu.Unlock()
if err != nil { if rotateErr != nil {
echLogger.Error("rotating ECH configs failed", zap.Error(err)) echLogger.Error("rotating ECH configs failed", zap.Error(rotateErr))
} }
case <-t.ctx.Done(): case <-t.ctx.Done():
return return