From c01fe8d63cd5fb31ef556482c56d0150a9dc740c Mon Sep 17 00:00:00 2001 From: Reasno Date: Sat, 8 May 2021 13:40:53 +0800 Subject: [PATCH] fix: empty output in redirected logs --- src/Listener/LogRedirectListener.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Listener/LogRedirectListener.php b/src/Listener/LogRedirectListener.php index d8653d1..c72f247 100644 --- a/src/Listener/LogRedirectListener.php +++ b/src/Listener/LogRedirectListener.php @@ -71,7 +71,9 @@ public function process(object $event) if ($recv === false && $sock->errCode !== SOCKET_ETIMEDOUT) { throw new SocketAcceptException('Socket is closed', $sock->errCode); } - $this->logOutput((string) $recv); + if ($recv !== false) { + $this->logOutput((string) $recv); + } } catch (\Throwable $exception) { $this->logThrowable($exception); if ($exception instanceof SocketAcceptException) {