Skip to content

Commit

Permalink
fix: restful server restart
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Sep 10, 2024
1 parent 7c8f451 commit 89b9438
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hub/route/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ func start(cfg *Config) {
server := &http.Server{
Handler: router(cfg.IsDebug, cfg.Secret, cfg.DohServer),
}
httpServer = server
if err = server.Serve(l); err != nil {
log.Errorln("External controller serve error: %s", err)
}
httpServer = server
}
}

Expand Down Expand Up @@ -183,10 +183,10 @@ func startTLS(cfg *Config) {
Certificates: []tls.Certificate{c},
},
}
tlsServer = server
if err = server.ServeTLS(l, "", ""); err != nil {
log.Errorln("External controller tls serve error: %s", err)
}
tlsServer = server
}
}

Expand Down Expand Up @@ -228,10 +228,10 @@ func startUnix(cfg *Config) {
server := &http.Server{
Handler: router(cfg.IsDebug, "", cfg.DohServer),
}
unixServer = server
if err = server.Serve(l); err != nil {
log.Errorln("External controller unix serve error: %s", err)
}
unixServer = server
}

}
Expand Down

0 comments on commit 89b9438

Please sign in to comment.