bc63efdd81
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().