Skip to content

Commit c39d6a5

Browse files
committed
fix: status watcher exit may cause exponential cascade of subprocess spawning
1 parent 7e8837e commit c39d6a5

File tree

1 file changed

+3
-1
lines changed
  • plugins/plugin-codeflare/src/tray/watchers/profile

1 file changed

+3
-1
lines changed

Diff for: plugins/plugin-codeflare/src/tray/watchers/profile/status.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export default class ProfileStatusWatcher {
9191
Debug("codeflare")("Watcher error", profile)
9292
this.headReadiness = "error"
9393
this.workerReadiness = "error"
94-
this.initJobWithDelay(profile, 2000) // restart after a delay
94+
// WARNING: DO NOT initJob() here, that will be handled in the
95+
// "close" handler. If you do so here (too), then an exponential
96+
// cascade of subprocess spawning may result.
9597
})
9698

9799
job.on("close", async (exitCode) => {

0 commit comments

Comments
 (0)