Skip to content

Commit

Permalink
Resolve PID promise after marking process as running
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Nov 8, 2018
1 parent 9d0d7ab commit 5187475
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Internal/Windows/SocketConnector.php
Expand Up @@ -257,8 +257,6 @@ public function onReadableChildPid($watcher, $socket, Handle $handle)
return;
}

$handle->pidDeferred->resolve($packet['pid']);

// Required, because a process might be destroyed while starting
if ($handle->status === ProcessStatus::STARTING) {
$handle->status = ProcessStatus::RUNNING;
Expand All @@ -269,6 +267,8 @@ public function onReadableChildPid($watcher, $socket, Handle $handle)
}
}

$handle->pidDeferred->resolve($packet['pid']);

unset($this->pendingProcesses[$handle->wrapperPid]);
}

Expand Down

0 comments on commit 5187475

Please sign in to comment.