mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-11-02 13:13:20 +08:00
Previously, connect() called create() (which spawns a new child process and writes processes[key]) before closing the existing client. The old client's close handler would then delete processes[key], removing the *new* process entry from the map — losing track of the new child. Move the existing client close to before create(), matching the pattern already used in add().