@rivus/agent 0.8.0 → 0.8.2
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/dist/mcp.js +5 -1
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -368,13 +368,17 @@ function createBackgroundSessionControlHttpServer(options) {
|
|
|
368
368
|
},
|
|
369
369
|
start: async () => {
|
|
370
370
|
if (server) return;
|
|
371
|
-
await new Promise((resolve) => {
|
|
371
|
+
await new Promise((resolve, reject) => {
|
|
372
372
|
server = serverHandle;
|
|
373
373
|
serverHandle.listen(options.port, options.host ?? "127.0.0.1", () => {
|
|
374
374
|
const address = serverHandle.address();
|
|
375
375
|
if (address !== null && typeof address === "object") boundPort = address.port;
|
|
376
376
|
resolve();
|
|
377
377
|
});
|
|
378
|
+
serverHandle.once("error", (error) => {
|
|
379
|
+
server = void 0;
|
|
380
|
+
reject(error);
|
|
381
|
+
});
|
|
378
382
|
});
|
|
379
383
|
}
|
|
380
384
|
};
|