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.
Files changed (2) hide show
  1. package/index.js +6 -3
  2. 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
- prc.reject(
432
- 'Request is determined to be failed, and the process is terminated as your wish',
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ws-process",
3
- "version": "0.3.35",
3
+ "version": "0.3.36",
4
4
  "description": "Process Management for Web Socket Client",
5
5
  "main": "index.js",
6
6
  "scripts": {