1
0
mirror of https://github.com/danog/amp.git synced 2025-01-22 13:21:16 +01:00

Don't invoke onStart callback in UvReactor::run() when empty

This commit is contained in:
Daniel Lowrey 2014-08-08 14:15:23 -04:00
parent 58137cdb32
commit 1aa1778401

View File

@ -45,7 +45,9 @@ class UvReactor implements SignalReactor {
} }
$this->isRunning = true; $this->isRunning = true;
$this->immediately(function() use ($onStart) { $onStart($this); }); if ($onStart) {
$this->immediately(function() use ($onStart) { $onStart($this); });
}
uv_run($this->loop); uv_run($this->loop);
$this->isRunning = false; $this->isRunning = false;