优化代码

This commit is contained in:
GoEdgeLab
2022-08-03 23:31:08 +08:00
parent 2d243e90fb
commit 884cfa2f6f
2 changed files with 5 additions and 1 deletions

View File

@@ -682,7 +682,7 @@ func (this *Node) listenSock() error {
if this.sock.IsListening() {
reply, err := this.sock.Send(&gosock.Command{Code: "pid"})
if err == nil {
return errors.New("error: the process is already running, pid: " + maps.NewMap(reply.Params).GetString("pid"))
return errors.New("error: the process is already running, pid: " + types.String(maps.NewMap(reply.Params).GetInt("pid")))
} else {
return errors.New("error: the process is already running")
}