From cb8910b3372a715191d53f580f4c6d6c90e540df Mon Sep 17 00:00:00 2001 From: zhangyuheng Date: Fri, 15 Dec 2023 15:03:23 +0800 Subject: [PATCH] modified: src/entity/instance/on_demand.ts --- src/entity/instance/on_demand.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entity/instance/on_demand.ts b/src/entity/instance/on_demand.ts index 9f90f8d..c8cd35b 100644 --- a/src/entity/instance/on_demand.ts +++ b/src/entity/instance/on_demand.ts @@ -83,6 +83,10 @@ export class OnDemandRunner { await new Promise((ok) => { const net = require('net'); for (const port of this.ports) { + if (!port.port) { + logger.error(`${this.instance.instanceUuid} not available port found `, port); + continue; + } const server = net.createServer(); server.listen(port.port); logger.info(`${this.instance.instanceUuid} socket listing on `, port.port); @@ -105,6 +109,7 @@ export class OnDemandRunner { resolve(); } catch (error) { reject(error); + this.instance.runOnDemand(); } }); }