Skip to content

Commit a4ce5fe

Browse files
committed
fix(webapp): reap OTLP workers on any exit, not just non-zero
A worker that exits cleanly (code 0) while holding a task previously left the request hanging until the task timeout and the pool one worker short. Reap on any exit; the double-reap guard makes this a no-op when error already reaped it.
1 parent 18d1daa commit a4ce5fe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/webapp/app/v3/otlpWorkerPool.server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ export class OtlpWorkerPool {
7373
});
7474

7575
worker.on("exit", (code) => {
76-
if (code !== 0) {
77-
this.reap(worker, new Error(`otlp worker exited with code ${code}`));
78-
}
76+
// Any exit means this worker is gone, including a clean exit while it held a task; reap()
77+
// no-ops if the worker was already removed (e.g. error fired first).
78+
this.reap(worker, new Error(`otlp worker exited with code ${code}`));
7979
});
8080

8181
this.workers.push(worker);

0 commit comments

Comments
 (0)