diff --git a/common.go b/common.go index 2655ead..155bfc5 100644 --- a/common.go +++ b/common.go @@ -1650,7 +1650,10 @@ func (c *Config) writeKeyLog(label string, clientRandom, secret []byte) error { _, err := c.KeyLogWriter.Write(logLine) writerMutex.Unlock() - return err + if err != nil { + return fmt.Errorf("tls: KeyLogWriter: %w", err) + } + return nil } // writerMutex protects all KeyLogWriters globally. It is rarely enabled,