register servers after loading statics (#1568)

This commit is contained in:
Ian Bashford 2021-01-02 10:57:18 +00:00 committed by GitHub
parent b8d17debfd
commit 5b8c9c495f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -774,7 +774,6 @@ func (config *Config) loadSources(proxy *Proxy) error {
return err
}
}
proxy.updateRegisteredServers()
for name, config := range config.StaticsConfig {
if stamp, err := stamps.NewServerStampFromString(config.Stamp); err == nil {
if stamp.Proto == stamps.StampProtoTypeDNSCryptRelay || stamp.Proto == stamps.StampProtoTypeODoHRelay {
@ -806,7 +805,7 @@ func (config *Config) loadSources(proxy *Proxy) error {
rand.Shuffle(len(proxy.registeredServers), func(i, j int) {
proxy.registeredServers[i], proxy.registeredServers[j] = proxy.registeredServers[j], proxy.registeredServers[i]
})
proxy.updateRegisteredServers()
return nil
}