Explorar o código

Fix "Fix reloading of tls.certificate_path, tls.key_path and tls.ech.key_path"

世界 hai 11 meses
pai
achega
e58b549d0f
Modificáronse 2 ficheiros con 10 adicións e 2 borrados
  1. 5 1
      common/tls/ech_server.go
  2. 5 1
      common/tls/std_server.go

+ 5 - 1
common/tls/ech_server.go

@@ -97,8 +97,12 @@ func (c *echServerConfig) startWatcher() error {
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
+	err = c.watcher.Start()
+	if err != nil {
+		return err
+	}
 	c.watcher = watcher
 	c.watcher = watcher
-	return c.watcher.Start()
+	return nil
 }
 }
 
 
 func (c *echServerConfig) credentialsUpdated(path string) error {
 func (c *echServerConfig) credentialsUpdated(path string) error {

+ 5 - 1
common/tls/std_server.go

@@ -106,8 +106,12 @@ func (c *STDServerConfig) startWatcher() error {
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
+	err = c.watcher.Start()
+	if err != nil {
+		return err
+	}
 	c.watcher = watcher
 	c.watcher = watcher
-	return c.watcher.Start()
+	return nil
 }
 }
 
 
 func (c *STDServerConfig) certificateUpdated(path string) error {
 func (c *STDServerConfig) certificateUpdated(path string) error {