in client.go [423:448]
func (c *client) reConnect() {
var num, max, times, interval int
max = c.number
interval = c.reconnectInterval
if interval == 0 {
interval = reconnectInterval
}
for {
if c.IsClosed() {
log.Warnf("client{peer:%s} goroutine exit now.", c.addr)
break
}
num = c.sessionNum()
if max <= num {
break
}
c.connect()
times++
if maxTimes < times {
times = maxTimes
}
<-gxtime.After(time.Duration(int64(times) * int64(interval)))
}
}