- try to fix EOF bug when accessing wenxi api.

This commit is contained in:
gazebo
2018-08-05 16:11:07 +08:00
parent af1155e415
commit 0924e3719d
2 changed files with 2 additions and 1 deletions

View File

@@ -80,8 +80,8 @@ func AccessPlatformAPIWithRetry(client *http.Client, request *http.Request, conf
if err != nil {
baseapi.SugarLogger.Debugf("AccessPlatformAPIWithRetry client.Get return err:%v", err)
err, ok := err.(net.Error)
recoverableErrorRetryCount++
if ok && err.Timeout() && recoverableErrorRetryCount <= config.MaxRecoverableRetryCount {
recoverableErrorRetryCount++
continue
} else {
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry access api request:%v, error:%v", request, err)