@openagents-org/agent-connector 0.1.5 → 0.1.6
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/package.json +1 -1
- package/src/daemon.js +1 -5
package/package.json
CHANGED
package/src/daemon.js
CHANGED
|
@@ -763,11 +763,7 @@ class Daemon {
|
|
|
763
763
|
try {
|
|
764
764
|
if (!fs.existsSync(pidFile)) return null;
|
|
765
765
|
const pid = parseInt(fs.readFileSync(pidFile, 'utf-8').trim(), 10);
|
|
766
|
-
|
|
767
|
-
if (Daemon._isAlive(pid)) return pid;
|
|
768
|
-
// Stale
|
|
769
|
-
try { fs.unlinkSync(pidFile); } catch {}
|
|
770
|
-
return null;
|
|
766
|
+
return isNaN(pid) ? null : pid;
|
|
771
767
|
} catch {
|
|
772
768
|
return null;
|
|
773
769
|
}
|