mirror of
https://github.com/danog/parallel.git
synced 2024-11-26 12:24:40 +01:00
Fix handling of invalid connections
Channel::receive() can throw ChannelException and SerializationException, so just catch everything here.
This commit is contained in:
parent
a9e22e9ef8
commit
a0575b4930
@ -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.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user