@xuda.io/xuda-worker-bundle-min 1.3.509 → 1.3.510

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 +12 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1124,15 +1124,20 @@ func.common.perform_rpi_request = async function (
1124
1124
  service: serviceP,
1125
1125
  data,
1126
1126
  });
1127
+ throw new Error("fail to fetch from ws");
1127
1128
  };
1128
1129
 
1129
- if (
1130
- RUNTIME_SERVER_WEBSOCKET &&
1131
- RUNTIME_SERVER_WEBSOCKET_CONNECTED &&
1132
- SESSION_OBJ?.[SESSION_ID]?.rpi_http_methods?.includes(serviceP)
1133
- ) {
1134
- return await ws();
1135
- } else {
1130
+ try {
1131
+ if (
1132
+ RUNTIME_SERVER_WEBSOCKET &&
1133
+ RUNTIME_SERVER_WEBSOCKET_CONNECTED &&
1134
+ SESSION_OBJ?.[SESSION_ID]?.rpi_http_methods?.includes(serviceP)
1135
+ ) {
1136
+ return await ws();
1137
+ } else {
1138
+ throw new Error("fail to fetch from ws websocket inactive");
1139
+ }
1140
+ } catch (err) {
1136
1141
  return await http();
1137
1142
  }
1138
1143
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.509",
3
+ "version": "1.3.510",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {