mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-04 02:07:32 +03:00
Fix race codes
This commit is contained in:
@@ -163,15 +163,10 @@ func (c *STDServerConfig) certificateUpdated(path string) error {
|
||||
if err != nil {
|
||||
return E.Cause(err, "reload ECH keys from ", c.echKeyPath)
|
||||
}
|
||||
echKeys, err := parseECHKeys(echKey)
|
||||
err = c.setECHServerConfig(echKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.access.Lock()
|
||||
config := c.config.Clone()
|
||||
config.EncryptedClientHelloKeys = echKeys
|
||||
c.config = config
|
||||
c.access.Unlock()
|
||||
c.logger.Info("reloaded ECH keys")
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user