@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.
- package/index.js +12 -7
- 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
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
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
|
};
|