socket-function 1.1.36 → 1.1.37
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/SocketFunction.ts +10 -2
- package/package.json +1 -1
package/SocketFunction.ts
CHANGED
|
@@ -306,8 +306,16 @@ export class SocketFunction {
|
|
|
306
306
|
(async () => {
|
|
307
307
|
let factory = await getCallFactory(nodeId);
|
|
308
308
|
if (!factory) {
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
for (let i = 0; i < 30; i++) {
|
|
310
|
+
await delay(1000);
|
|
311
|
+
factory = await getCallFactory(nodeId);
|
|
312
|
+
if (factory) break;
|
|
313
|
+
}
|
|
314
|
+
if (!factory) {
|
|
315
|
+
console.error(`Failed to get call factory for ${nodeId} after 30 seconds, giving up.`);
|
|
316
|
+
callback();
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
311
319
|
}
|
|
312
320
|
|
|
313
321
|
factory.onNextDisconnect(callback);
|