ws-process 0.3.34 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -428,9 +428,12 @@ function handleResponseHandler(res, getState, isLast = true, isFirst = true) {
|
|
|
428
428
|
}
|
|
429
429
|
if (isValid === null) {
|
|
430
430
|
local.afterEachProcess(prc, local.wsProcess.processes);
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
431
|
+
const errMsg = ['Request is determined to be failed', 'and the process is terminated as your wish'].join(', ');
|
|
432
|
+
if (tryit(() => prc.options.doNotRejectIfTerminate) === true) {
|
|
433
|
+
console.warn(errMsg);
|
|
434
|
+
} else {
|
|
435
|
+
prc.reject(errMsg);
|
|
436
|
+
}
|
|
434
437
|
wrapClearWSProcess(res.processID);
|
|
435
438
|
return { terminate: true, cbData };
|
|
436
439
|
}
|
|
@@ -1120,7 +1123,7 @@ function runProcess(processID, data) {
|
|
|
1120
1123
|
} else {
|
|
1121
1124
|
local.afterEachProcess(prcInner, local.wsProcess.processes);
|
|
1122
1125
|
|
|
1123
|
-
prcInner.reject(error);
|
|
1126
|
+
// prcInner.reject(error);
|
|
1124
1127
|
wrapClearWSProcess(error.processID);
|
|
1125
1128
|
}
|
|
1126
1129
|
});
|