mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-05 03:23:50 +08:00
try to fix panic.
This commit is contained in:
parent
4013c07718
commit
22159e13f9
@ -894,7 +894,7 @@ func (c *QQClient) connect() error {
|
|||||||
if c.currServerIndex == len(c.servers) {
|
if c.currServerIndex == len(c.servers) {
|
||||||
c.currServerIndex = 0
|
c.currServerIndex = 0
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil || conn == nil {
|
||||||
c.retryTimes++
|
c.retryTimes++
|
||||||
if c.retryTimes > len(c.servers) {
|
if c.retryTimes > len(c.servers) {
|
||||||
return errors.New("network error")
|
return errors.New("network error")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user