|
@@ -728,8 +728,8 @@ func (h *Hub) ConnectToServerX(channel string, force bool) {
|
|
|
if err == nil {
|
|
|
return
|
|
|
}
|
|
|
+ log.Println("[ConnectToServer ERROR, try it again]", channel, host.Host, err)
|
|
|
host = nil
|
|
|
- log.Println("[ConnectToServer ERROR, try it again]", err)
|
|
|
// 产生一个随机数避免刹间重连过载
|
|
|
r := rand.New(rand.NewSource(time.Now().UnixNano()))
|
|
|
time.Sleep(time.Duration(r.Intn(h.cf.ConnectTimeout)+(h.cf.ConnectTimeout/2)) * time.Millisecond)
|