From a0575b4930b6ffbe68938333451b3790b68226c9 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 18 Feb 2019 18:44:30 -0600 Subject: [PATCH] Fix handling of invalid connections Channel::receive() can throw ChannelException and SerializationException, so just catch everything here. --- lib/Context/Internal/ProcessHub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Context/Internal/ProcessHub.php b/lib/Context/Internal/ProcessHub.php index 11a318d..dbdf81c 100644 --- a/lib/Context/Internal/ProcessHub.php +++ b/lib/Context/Internal/ProcessHub.php @@ -64,7 +64,7 @@ final class ProcessHub try { $received = yield Promise\timeout($channel->receive(), self::KEY_RECEIVE_TIMEOUT); - } catch (TimeoutException $exception) { + } catch (\Throwable $exception) { $channel->close(); return; // Ignore possible foreign connection attempt. }