This commit is contained in:
邹宗楠
2022-10-24 11:22:08 +08:00
parent 24b8b4ad97
commit c43d4d5f29
6 changed files with 1 additions and 10 deletions

View File

@@ -5,7 +5,6 @@ import (
"compress/gzip"
"errors"
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"io/ioutil"
"math"
"net"
@@ -122,7 +121,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
usedMilliSecond := time.Now().Sub(beginTime) / time.Millisecond
if err != nil {
err, ok := err.(net.Error)
globals.SugarLogger.Debugf("AccessPlatformAPIWithRetry err %s", err)
baseapi.SugarLogger.Infof("err %s", err)
recoverableErrorRetryCount++
if ok /*&& err.Timeout()*/ && recoverableErrorRetryCount <= config.MaxRecoverableRetryCount { // 只要是网络错误都重试
continue