nuwax-mcp-stdio-proxy 1.3.0 → 1.3.1
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/bridge.js +1 -18
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bridge.js
CHANGED
|
@@ -227,8 +227,6 @@ export class PersistentMcpBridge {
|
|
|
227
227
|
}
|
|
228
228
|
entry.restarting = false;
|
|
229
229
|
entry.healthy = false;
|
|
230
|
-
// Capture PID before closing (transport.close() may invalidate the getter)
|
|
231
|
-
const pid = entry.transport?.pid;
|
|
232
230
|
try {
|
|
233
231
|
if (entry.client)
|
|
234
232
|
await entry.client.close();
|
|
@@ -236,7 +234,7 @@ export class PersistentMcpBridge {
|
|
|
236
234
|
catch (e) {
|
|
237
235
|
this.log.warn(`${LOG_TAG} Error closing client for "${id}":`, e);
|
|
238
236
|
}
|
|
239
|
-
// transport.close()
|
|
237
|
+
// transport.close() handles graceful shutdown: stdin.end → SIGTERM → SIGKILL
|
|
240
238
|
try {
|
|
241
239
|
if (entry.transport)
|
|
242
240
|
await entry.transport.close();
|
|
@@ -244,21 +242,6 @@ export class PersistentMcpBridge {
|
|
|
244
242
|
catch (e) {
|
|
245
243
|
this.log.warn(`${LOG_TAG} Error closing transport for "${id}":`, e);
|
|
246
244
|
}
|
|
247
|
-
// Force kill via PID if still alive after transport.close()
|
|
248
|
-
if (pid) {
|
|
249
|
-
try {
|
|
250
|
-
process.kill(pid, 0); // test if alive
|
|
251
|
-
process.kill(pid, 'SIGTERM');
|
|
252
|
-
setTimeout(() => {
|
|
253
|
-
try {
|
|
254
|
-
process.kill(pid, 0);
|
|
255
|
-
process.kill(pid, 'SIGKILL');
|
|
256
|
-
}
|
|
257
|
-
catch { /* already dead */ }
|
|
258
|
-
}, 2000);
|
|
259
|
-
}
|
|
260
|
-
catch { /* already dead */ }
|
|
261
|
-
}
|
|
262
245
|
entry.client = null;
|
|
263
246
|
entry.transport = null;
|
|
264
247
|
}
|
package/dist/index.js
CHANGED
|
@@ -23234,7 +23234,7 @@ async function connectBridge(id, entry) {
|
|
|
23234
23234
|
|
|
23235
23235
|
// src/index.ts
|
|
23236
23236
|
var PKG_NAME = "nuwax-mcp-stdio-proxy";
|
|
23237
|
-
var PKG_VERSION = "1.3.
|
|
23237
|
+
var PKG_VERSION = "1.3.1";
|
|
23238
23238
|
function parseConfig() {
|
|
23239
23239
|
const args = process.argv.slice(2);
|
|
23240
23240
|
const idx = args.indexOf("--config");
|