From 7959b6b52b6b6909bf1961553580acebddb27a99 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Sun, 29 Jul 2018 20:18:51 +0200 Subject: [PATCH] Fix tests --- lib/Internal/Socket.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Internal/Socket.php b/lib/Internal/Socket.php index d3f0b50..7020b80 100644 --- a/lib/Internal/Socket.php +++ b/lib/Internal/Socket.php @@ -134,7 +134,7 @@ abstract class Socket if (!$this->receiving) { $this->receiving = true; - Task::async(\Closure::fromCallable([$this, 'receiveIncomingMessages'])); + Amp\rethrow(Task::async(\Closure::fromCallable([$this, 'receiveIncomingMessages']))); } try { @@ -214,7 +214,7 @@ abstract class Socket while ($this->receiving) { try { $message = $this->receive(); - } catch (StreamException $exception) { + } catch (\Throwable $exception) { $this->error($exception); return; }