From add7b3ff0b16d07895a303a4754c22f95f4ecc0f Mon Sep 17 00:00:00 2001 From: techno-express Date: Fri, 27 Mar 2020 14:17:35 -0400 Subject: [PATCH] linux build bug fix --- Spawn/Launcher.php | 2 +- Spawn/Spawn.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Spawn/Launcher.php b/Spawn/Launcher.php index 1e4827f..c441609 100644 --- a/Spawn/Launcher.php +++ b/Spawn/Launcher.php @@ -588,7 +588,7 @@ public function getSignaled(): ?int /** * @codeCoverageIgnore */ - public static function uvLoop(?\UVLoop $loop) + public static function uvLoop(\UVLoop $loop) { self::$uv = $loop; } diff --git a/Spawn/Spawn.php b/Spawn/Spawn.php index 78105dc..2d94313 100644 --- a/Spawn/Spawn.php +++ b/Spawn/Spawn.php @@ -151,9 +151,12 @@ public static function create( * * @codeCoverageIgnore */ - public static function setup(?\UVLoop $loop = null, bool $isYield = true, bool $bypass = true, bool $useUv = true): void + public static function setup($loop, bool $isYield = true, bool $bypass = true, bool $useUv = true): void { - Launcher::uvLoop($loop); + if ($loop instanceof \UVLoop) { + Launcher::uvLoop($loop); + } + self::$bypass = $bypass; self::$isYield = $isYield; self::$useUv = $useUv;