减少Daemon使用的内存

This commit is contained in:
GoEdgeLab
2022-07-26 09:41:43 +08:00
parent 222631bdb9
commit 99b7f77410
12 changed files with 51 additions and 4 deletions

View File

@@ -207,8 +207,9 @@ func (this *Node) Start() {
// Daemon 实现守护进程
func (this *Node) Daemon() {
isDebug := lists.ContainsString(os.Args, "debug")
isDebug = true
teaconst.IsDaemon = true
var isDebug = lists.ContainsString(os.Args, "debug")
for {
conn, err := this.sock.Dial()
if err != nil {
@@ -227,7 +228,7 @@ func (this *Node) Daemon() {
_ = os.Setenv("EdgeDaemon", "on")
_ = os.Setenv("EdgeBackground", "on")
cmd := exec.Command(exe)
var cmd = exec.Command(exe)
err = cmd.Start()
if err != nil {
return err