From 6d5836c4d6f8e71d6f74160804926ca38ec9f9e6 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 24 Jul 2018 10:33:11 +0300 Subject: [PATCH] Don't show errors (don't care about failed fwrite. If you do - overwrite method in extended class) --- src/Handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handler.php b/src/Handler.php index 519fed7..488690e 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -131,7 +131,7 @@ protected function write($client, $data): Generator Logger::log('worker', $this->pid, 'fwrite to', (int)$client . ' - ' . (string)$data); try { - fwrite($client, $data); + @fwrite($client, $data); } catch (\Throwable $e) { // Here you can implement error handler }