mirror of
https://github.com/dtzp555-max/ocp.git
synced 2026-07-26 15:35:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2fa21ddf7 |
+1
-7
@@ -1371,6 +1371,7 @@ function spawnClaudeProcess(model, messages, conversationId, keyName, releaseSlo
|
|||||||
promptChars = stdinPayload.length;
|
promptChars = stdinPayload.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stats.activeRequests++;
|
||||||
stats.totalRequests++;
|
stats.totalRequests++;
|
||||||
stats.oneOffRequests++;
|
stats.oneOffRequests++;
|
||||||
if (conversationId) {
|
if (conversationId) {
|
||||||
@@ -1413,13 +1414,6 @@ function spawnClaudeProcess(model, messages, conversationId, keyName, releaseSlo
|
|||||||
|
|
||||||
const proc = spawn(CLAUDE, cliArgs, spawnOpts);
|
const proc = spawn(CLAUDE, cliArgs, spawnOpts);
|
||||||
activeProcesses.add(proc);
|
activeProcesses.add(proc);
|
||||||
// Counter drift (#180, reported by @konceptnet): increment ONLY after the spawn has
|
|
||||||
// succeeded and the process is registered. cleanup() below is the SOLE decrement site and is
|
|
||||||
// wired to this proc's exit/close/error events, so increment and decrement are now
|
|
||||||
// structurally paired to one process lifecycle. Incrementing before the spawn (as this did)
|
|
||||||
// leaked +1 permanently on any synchronous throw in between — buildCliArgs, env assembly, the
|
|
||||||
// spawn decision, or spawn() itself — because cleanup() was not yet attached to anything.
|
|
||||||
stats.activeRequests++;
|
|
||||||
|
|
||||||
const t0 = Date.now();
|
const t0 = Date.now();
|
||||||
let gotFirstByte = false;
|
let gotFirstByte = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user