Skip to content

Commit

Permalink
Merge pull request #44 from hyperf/fix/log
Browse files Browse the repository at this point in the history
fix: empty output in redirected logs
  • Loading branch information
Reasno authored May 8, 2021
2 parents 8202bbc + c01fe8d commit 7857938
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Listener/LogRedirectListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7857938

Please sign in to comment.