Skip to content

Commit 984275d

Browse files
committed
optimize switch region logic
1 parent 678bc3e commit 984275d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/qiniu/storage/BaseUploader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ private boolean couldSwitchRegionAndRetry(Response response, QiniuException exce
6666

6767
if (checkResponse != null) {
6868
int statusCode = checkResponse.statusCode;
69-
return (statusCode < 200 || statusCode > 299) && statusCode > -2
69+
return (statusCode > -2 && statusCode < 200) || (statusCode > 299
7070
&& statusCode != 401 && statusCode != 413 && statusCode != 419
71-
&& statusCode != 608 && statusCode != 614 && statusCode != 630;
71+
&& statusCode != 608 && statusCode != 614 && statusCode != 630);
7272
}
7373

7474
return exception == null || !exception.isUnrecoverable();

0 commit comments

Comments
 (0)