pmxtjs 2.34.1 → 2.34.3
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/esm/pmxt/client.d.ts +22 -0
- package/dist/esm/pmxt/client.js +386 -88
- package/dist/esm/pmxt/server-manager.js +16 -2
- package/dist/pmxt/client.d.ts +22 -0
- package/dist/pmxt/client.js +386 -88
- package/dist/pmxt/server-manager.js +16 -2
- package/generated/package.json +1 -1
- package/package.json +2 -2
- package/pmxt/client.ts +363 -88
- package/pmxt/server-manager.ts +15 -2
package/pmxt/server-manager.ts
CHANGED
|
@@ -349,10 +349,23 @@ export class ServerManager {
|
|
|
349
349
|
if (info && info.pid) {
|
|
350
350
|
try {
|
|
351
351
|
process.kill(info.pid, 'SIGTERM');
|
|
352
|
-
// Brief wait
|
|
353
352
|
await new Promise(resolve => setTimeout(resolve, 500));
|
|
354
353
|
} catch {
|
|
355
|
-
//
|
|
354
|
+
// Process already dead — fall through to lock cleanup
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Verify the process is actually dead; escalate to SIGKILL if not
|
|
358
|
+
try {
|
|
359
|
+
process.kill(info.pid, 0); // throws if dead
|
|
360
|
+
// Still alive — force kill
|
|
361
|
+
try {
|
|
362
|
+
process.kill(info.pid, 'SIGKILL');
|
|
363
|
+
await new Promise(resolve => setTimeout(resolve, 200));
|
|
364
|
+
} catch {
|
|
365
|
+
// Ignore — SIGKILL may race with natural exit
|
|
366
|
+
}
|
|
367
|
+
} catch {
|
|
368
|
+
// Process is dead — good
|
|
356
369
|
}
|
|
357
370
|
}
|
|
358
371
|
// Remove lock file (best effort)
|