From 1d81996ceb75dc072015028882d77abdfc35cd26 Mon Sep 17 00:00:00 2001 From: zeetex Date: Mon, 18 Nov 2024 13:24:14 +0800 Subject: [PATCH] Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path --- common/tls/ech_server.go | 4 ++-- common/tls/std_server.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/tls/ech_server.go b/common/tls/ech_server.go index ac3e6279..00b24fd5 100644 --- a/common/tls/ech_server.go +++ b/common/tls/ech_server.go @@ -98,7 +98,7 @@ func (c *echServerConfig) startWatcher() error { return err } c.watcher = watcher - return nil + return c.watcher.Start() } func (c *echServerConfig) credentialsUpdated(path string) error { @@ -232,7 +232,7 @@ func NewECHServer(ctx context.Context, logger log.Logger, options option.Inbound var echKey []byte if len(options.ECH.Key) > 0 { echKey = []byte(strings.Join(options.ECH.Key, "\n")) - } else if options.KeyPath != "" { + } else if options.ECH.KeyPath != "" { content, err := os.ReadFile(options.ECH.KeyPath) if err != nil { return nil, E.Cause(err, "read ECH key") diff --git a/common/tls/std_server.go b/common/tls/std_server.go index 7001bd3a..82ea9134 100644 --- a/common/tls/std_server.go +++ b/common/tls/std_server.go @@ -107,7 +107,7 @@ func (c *STDServerConfig) startWatcher() error { return err } c.watcher = watcher - return nil + return c.watcher.Start() } func (c *STDServerConfig) certificateUpdated(path string) error {