Skip to content

Commit

Permalink
fix:maxDuration typo
Browse files Browse the repository at this point in the history
  • Loading branch information
No-SilverBullet authored Apr 18, 2024
1 parent 05a6a9a commit b33c1e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func (c *client) RunEventLoop(newSession NewSessionCallback) {
func (c *client) reConnect() {
var (
num, max, times, interval int
maxDuraion int64
maxDuration int64
)
max = c.number
interval = c.reconnectInterval
Expand All @@ -446,11 +446,11 @@ func (c *client) reConnect() {
c.connect()
times++
if times > maxTimes {
maxDuraion = int64(maxTimes) * int64(interval)
maxDuration = int64(maxTimes) * int64(interval)
} else {
maxDuraion = int64(times) * int64(interval)
maxDuration = int64(times) * int64(interval)
}
<-gxtime.After(time.Duration(maxDuraion))
<-gxtime.After(time.Duration(maxDuration))
}
}

Expand Down

0 comments on commit b33c1e6

Please sign in to comment.