From 39ffc1a1ce689cbd7b6aab2b41f492feb34701d8 Mon Sep 17 00:00:00 2001 From: mpyw Date: Tue, 16 Aug 2016 15:37:29 +0900 Subject: [PATCH] Server->Client messages will be non-blocking thanks to stream_copy_to_stream() --- src/ProxyProcess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProxyProcess.php b/src/ProxyProcess.php index 1007407..32e303e 100644 --- a/src/ProxyProcess.php +++ b/src/ProxyProcess.php @@ -102,6 +102,6 @@ private function pipe($client, $server) } } fwrite($server, implode($lines) . $body); - fwrite($client, stream_get_contents($server)); + stream_copy_to_stream($server, $client); } }