diff --git a/hub/route/restart.go b/hub/route/restart.go index cae21844..a907021f 100644 --- a/hub/route/restart.go +++ b/hub/route/restart.go @@ -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" { diff --git a/hub/route/upgrade.go b/hub/route/upgrade.go index a58f224c..5e75bc8b 100644 --- a/hub/route/upgrade.go +++ b/hub/route/upgrade.go @@ -41,5 +41,5 @@ func upgrade(w http.ResponseWriter, r *http.Request) { f.Flush() } - go runRestart(execPath) + go restartExecutable(execPath) }