@openagents-org/agent-connector 0.1.2 → 0.1.4
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/config.js +1 -9
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -135,15 +135,7 @@ class Config {
|
|
|
135
135
|
try {
|
|
136
136
|
if (!fs.existsSync(this.pidFile)) return null;
|
|
137
137
|
const pid = parseInt(fs.readFileSync(this.pidFile, 'utf-8').trim(), 10);
|
|
138
|
-
|
|
139
|
-
try {
|
|
140
|
-
process.kill(pid, 0);
|
|
141
|
-
return pid;
|
|
142
|
-
} catch {
|
|
143
|
-
// Stale PID file
|
|
144
|
-
try { fs.unlinkSync(this.pidFile); } catch {}
|
|
145
|
-
return null;
|
|
146
|
-
}
|
|
138
|
+
return isNaN(pid) ? null : pid;
|
|
147
139
|
} catch {
|
|
148
140
|
return null;
|
|
149
141
|
}
|