Explorar el Código

fix error when autoRetry is disabled

jxyowen hace 7 años
padre
commit
caa10b31cd
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      sdk/client.go

+ 3 - 1
sdk/client.go

@@ -250,7 +250,9 @@ func (client *Client) DoActionWithSigner(request requests.AcsRequest, response r
 		var timeout bool
 		// receive error
 		if err != nil {
-			if timeout = isTimeout(err); !timeout {
+			if !client.config.AutoRetry {
+				return
+			} else if timeout = isTimeout(err); !timeout {
 				// if not timeout error, return
 				return
 			} else if retryTimes >= client.config.MaxRetryTime {