Be fix goroutine leak (#252)

* fix(gateway):fix goroutine leak

* fix(term):remove useless code

* fix(be):add pprof for debug mode
This commit is contained in:
1mtrue
2022-05-05 17:44:05 +08:00
committed by GitHub
parent 90751bacfc
commit 9e44b25b87
5 changed files with 95 additions and 66 deletions

View File

@ -3,6 +3,10 @@ package app
import (
"encoding/json"
"fmt"
"net/http"
_ "net/http/pprof"
"next-terminal/server/log"
"next-terminal/server/cli"
"next-terminal/server/config"
@ -104,6 +108,9 @@ func Run() error {
if err != nil {
return err
}
go func() {
log.Fatal(http.ListenAndServe("localhost:8099", nil))
}()
fmt.Printf("当前配置为: %v\n", string(jsonBytes))
}