chore: rename func name

This commit is contained in:
Larvan2 2023-08-30 15:52:41 +08:00
parent 9536372cfb
commit d099375200
2 changed files with 3 additions and 3 deletions

View file

@ -39,10 +39,10 @@ func restart(w http.ResponseWriter, r *http.Request) {
// The background context is used because the underlying functions wrap it
// with timeout and shut down the server, which handles current request. It
// also should be done in a separate goroutine for the same reason.
go runRestart(execPath)
go restartExecutable(execPath)
}
func runRestart(execPath string) {
func restartExecutable(execPath string) {
var err error
executor.Shutdown()
if runtime.GOOS == "windows" {

View file

@ -41,5 +41,5 @@ func upgrade(w http.ResponseWriter, r *http.Request) {
f.Flush()
}
go runRestart(execPath)
go restartExecutable(execPath)
}