From 19070f20711cb9d2c7c393d4172b66f7eaf38d02 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sun, 21 Aug 2022 23:09:47 +0800 Subject: [PATCH] =?UTF-8?q?IP=E5=BA=93=E6=94=B9=E4=B8=BA=E6=89=8B=E5=8A=A8?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/node.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/internal/nodes/node.go b/internal/nodes/node.go index 9afa50e..d785415 100644 --- a/internal/nodes/node.go +++ b/internal/nodes/node.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "errors" + iplib "github.com/TeaOSLab/EdgeCommon/pkg/iplibrary" "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" @@ -101,9 +102,6 @@ func (this *Node) Start() { // 监听signal this.listenSignals() - // 启动事件 - events.Notify(events.EventStart) - // 本地Sock err := this.listenSock() if err != nil { @@ -111,9 +109,19 @@ func (this *Node) Start() { return } + // 启动IP库 + remotelogs.Println("NODE", "initializing ip library ...") + err = iplib.Init() + if err != nil { + remotelogs.Error("NODE", "initialize ip library failed: "+err.Error()) + } + // 检查硬盘类型 this.checkDisk() + // 启动事件 + events.Notify(events.EventStart) + // 读取API配置 remotelogs.Println("NODE", "init config ...") err = this.syncConfig(0)