Browse Source

auto commit

tags/v1.0.0
yitter 4 years ago
parent
commit
fa06cf3dcb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      Go/source/regworkerid/reghelper.go

+ 1
- 1
Go/source/regworkerid/reghelper.go View File

@@ -66,6 +66,7 @@ func RegisterWorkerId(ip string, port int, password string, maxWorkerId int) int
_ConnString = ip + ":" + strconv.Itoa(port) _ConnString = ip + ":" + strconv.Itoa(port)
_Password = password _Password = password
_client = newRedisClient() _client = newRedisClient()
defer _client.Close()


_, err := _client.Ping(_ctx).Result() _, err := _client.Ping(_ctx).Result()
if err != nil { if err != nil {
@@ -74,7 +75,6 @@ func RegisterWorkerId(ip string, port int, password string, maxWorkerId int) int
if _Log { if _Log {
fmt.Println("init redis ok") fmt.Println("init redis ok")
} }
defer _client.Close()
} }


_loopCount = 0 _loopCount = 0


Loading…
Cancel
Save