ws-process 0.3.35 → 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 +6 -3
- 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
|
}
|