Skip to content

Commit 307b5db

Browse files
committed
fix pipe retry
1 parent ffcfeb0 commit 307b5db

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cos-nodejs-sdk-v5",
3-
"version": "2.10.4",
3+
"version": "2.10.5",
44
"description": "cos nodejs sdk v5",
55
"main": "index.js",
66
"types": "index.d.ts",

sdk/base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3536,6 +3536,7 @@ function submitRequest(params, callback) {
35363536
params.AuthData = AuthData;
35373537
_submitRequest.call(self, params, function (err, data) {
35383538
if (err &&
3539+
!(params.body && params.body.pipe) &&
35393540
!params.outputStream &&
35403541
tryTimes < 2 &&
35413542
(oldClockOffset !== self.options.SystemClockOffset || allowRetry.call(self, err))) {
@@ -3746,7 +3747,7 @@ function _submitRequest(params, callback) {
37463747
cb(util.error(new Error(xmlError.Message), {code: xmlError.Code, error: xmlError}));
37473748
} else if (statusCode) { // 有错误的状态码
37483749
cb(util.error(new Error(response.statusMessage), {code: '' + statusCode}));
3749-
} else if (statusCode) { // 无状态码,或者获取不到状态码
3750+
} else { // 无状态码,或者获取不到状态码
37503751
cb(util.error(new Error('statusCode error')));
37513752
}
37523753
chunkList = null;

0 commit comments

Comments
 (0)