Skip to content

Commit cb54c93

Browse files
liyanzhang505huiguangjun
authored andcommitted
add 502 status code to DefaultRetryStrategy
1 parent 6aefe1f commit cb54c93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/aliyun/oss/common/comm/DefaultServiceClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ public boolean shouldRetry(Exception ex, RequestMessage request, ResponseMessage
214214

215215
if (response != null) {
216216
int statusCode = response.getStatusCode();
217-
if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR
218-
|| statusCode == HttpStatus.SC_SERVICE_UNAVAILABLE) {
217+
if (statusCode == HttpStatus.SC_INTERNAL_SERVER_ERROR || statusCode == HttpStatus.SC_BAD_GATEWAY ||
218+
statusCode == HttpStatus.SC_SERVICE_UNAVAILABLE) {
219219
return true;
220220
}
221221
}

0 commit comments

Comments
 (0)