mirror of
https://github.com/koush/scrypted.git
synced 2026-06-20 16:40:30 +01:00
client: fix connectRPCObject always using scrypted cloud
This commit is contained in:
4
packages/client/package-lock.json
generated
4
packages/client/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.3.23",
|
||||
"version": "1.3.24",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.3.23",
|
||||
"version": "1.3.24",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"engine.io-client": "^6.6.3",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.3.23",
|
||||
"version": "1.3.24",
|
||||
"description": "",
|
||||
"main": "dist/packages/client/src/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -586,7 +586,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
|
||||
|
||||
const clusterPeerPromise = (async () => {
|
||||
const eioPath = 'engine.io/connectRPCObject';
|
||||
const eioEndpoint = address ? new URL(eioPath, address).pathname : '/' + eioPath;
|
||||
const eioEndpoint = new URL(eioPath, address).pathname;
|
||||
const clusterPeerOptions = {
|
||||
path: eioEndpoint,
|
||||
query: {
|
||||
@@ -599,7 +599,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
|
||||
transports: options?.transports,
|
||||
};
|
||||
|
||||
const clusterPeerSocket = new eio.Socket(explicitBaseUrl, clusterPeerOptions);
|
||||
const clusterPeerSocket = new eio.Socket(address, clusterPeerOptions);
|
||||
let peerReady = false;
|
||||
|
||||
// Timeout handling for dedicated transports
|
||||
|
||||
Reference in New Issue
Block a user