Skip to content

Commit

Permalink
style:调整代码注释
Browse files Browse the repository at this point in the history
  • Loading branch information
No-SilverBullet committed Apr 18, 2024
1 parent d3f5be3 commit 8100136
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ var (
ignoreReconnectKey = "ignore-reconnect"
)

var (
num, max, times, interval int
maxDuraion int64
)
type Client interface {
EndPoint
}
Expand Down Expand Up @@ -427,6 +423,10 @@ func (c *client) RunEventLoop(newSession NewSessionCallback) {

// a for-loop connect to make sure the connection pool is valid
func (c *client) reConnect() {
var (
num, max, times, interval int
maxDuraion int64
)
max = c.number
interval = c.reconnectInterval
if interval == 0 {
Expand All @@ -439,7 +439,7 @@ func (c *client) reConnect() {
}

num = c.sessionNum()
if max <= num || max < times {
if max <= num || max < times {
//Exit when the number of connection pools is sufficient or the reconnection times exceeds the connections numbers.
break
}
Expand Down

0 comments on commit 8100136

Please sign in to comment.