[server][ChildProcessManager] Fixed a bug that may call onCollected() if the child process doesn't exit.