* minor fixes

This commit is contained in:
Simon Zolin
2019-11-08 14:56:19 +03:00
parent 9b8cccdfcf
commit f579c23bc9
6 changed files with 22 additions and 14 deletions

View File

@@ -63,7 +63,15 @@ func (s *Server) handleSetUpstreamConfig(w http.ResponseWriter, r *http.Request)
newconf.BootstrapDNS = req.BootstrapDNS
newconf.AllServers = req.AllServers
err = s.Reconfigure2(newconf)
s.Lock()
s.conf.UpstreamDNS = newconf.UpstreamDNS
s.conf.BootstrapDNS = newconf.BootstrapDNS
s.conf.AllServers = newconf.AllServers
s.Unlock()
s.conf.ConfigModified()
err = s.Restart()
if err != nil {
httpError(r, w, http.StatusInternalServerError, "%s", err)
return