From 7dd2331f6c8bc39fdc33471a24dd49ebedc13023 Mon Sep 17 00:00:00 2001 From: azw Date: Sun, 20 Aug 2023 18:11:24 +0800 Subject: [PATCH] 1 --- app.go | 2 +- constant.go | 4 ++-- dbpool.go | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app.go b/app.go index 7d9b551..a8135ce 100644 --- a/app.go +++ b/app.go @@ -78,9 +78,9 @@ func (this *app) init(userApp UserApp) { var tmpNodeId, tmpInstanceId int flag.IntVar(&tmpNodeId, "n", 0, "node id") flag.IntVar(&tmpInstanceId, "i", 0, "instance id") + flag.Parse() this.nodeId = int32(tmpNodeId) this.instanceId = int32(tmpInstanceId) - flag.Parse() } this.uuid.SetMachineId((this.nodeId - 1) * MAX_NODE_ID + this.instanceId) this.loopCond = sync.NewCond(new(sync.Mutex)) diff --git a/constant.go b/constant.go index 15cfbb1..3be02e9 100644 --- a/constant.go +++ b/constant.go @@ -1,8 +1,8 @@ package f5 const ( - IM_HTTP_CLI_MGR_RESPONSE = 1 - IM_EXEC_MAIN_THREAD_CB = iota + IM_HTTP_CLI_MGR_RESPONSE = iota + 1 + IM_EXEC_MAIN_THREAD_CB ) const ( diff --git a/dbpool.go b/dbpool.go index e792a7a..e989032 100644 --- a/dbpool.go +++ b/dbpool.go @@ -31,6 +31,7 @@ type dbPool struct { func (this *dbPool) init(style DBStyle) { this.style = style + this.dataSourceHash = make(map[string]*q5.ListHead) } func (this *dbPool) unInit() {