1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

try to fix panic.

This commit is contained in:
Mrs4s 2020-09-19 19:19:43 +08:00
parent 4013c07718
commit 22159e13f9

View File

@ -894,7 +894,7 @@ func (c *QQClient) connect() error {
if c.currServerIndex == len(c.servers) {
c.currServerIndex = 0
}
if err != nil {
if err != nil || conn == nil {
c.retryTimes++
if c.retryTimes > len(c.servers) {
return errors.New("network error")