Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32f780366e | ||
|
|
041ea65d14 | ||
|
|
d65cdd4544 |
@@ -14,7 +14,7 @@ before_install:
|
||||
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.19.1
|
||||
|
||||
install:
|
||||
- npm --prefix client install
|
||||
- npm --prefix client ci
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
||||
@@ -352,23 +352,6 @@ func (s *Server) IsRunning() bool {
|
||||
return s.isRunning
|
||||
}
|
||||
|
||||
// Restart - restart server
|
||||
func (s *Server) Restart() error {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
log.Print("Start reconfiguring the server")
|
||||
err := s.stopInternal()
|
||||
if err != nil {
|
||||
return errorx.Decorate(err, "could not reconfigure the server")
|
||||
}
|
||||
err = s.startInternal()
|
||||
if err != nil {
|
||||
return errorx.Decorate(err, "could not reconfigure the server")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Reconfigure applies the new configuration to the DNS server
|
||||
func (s *Server) Reconfigure(config *ServerConfig) error {
|
||||
s.Lock()
|
||||
|
||||
@@ -121,7 +121,7 @@ func (s *Server) handleSetConfig(w http.ResponseWriter, r *http.Request) {
|
||||
s.conf.ConfigModified()
|
||||
|
||||
if restart {
|
||||
err = s.Restart()
|
||||
err = s.Reconfigure(nil)
|
||||
if err != nil {
|
||||
httpError(r, w, http.StatusInternalServerError, "%s", err)
|
||||
return
|
||||
@@ -172,7 +172,7 @@ func (s *Server) handleSetUpstreamConfig(w http.ResponseWriter, r *http.Request)
|
||||
s.Unlock()
|
||||
s.conf.ConfigModified()
|
||||
|
||||
err = s.Restart()
|
||||
err = s.Reconfigure(nil)
|
||||
if err != nil {
|
||||
httpError(r, w, http.StatusInternalServerError, "%s", err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user