diff --git a/app/Client/ProxyManager.php b/app/Client/ProxyManager.php index 26dacd6..271ca8d 100644 --- a/app/Client/ProxyManager.php +++ b/app/Client/ProxyManager.php @@ -38,6 +38,7 @@ public function createProxy(string $clientId, $connectionData) $proxyConnection->on('message', function ($message) use (&$localRequestConnection, $proxyConnection, $connectionData) { if ($localRequestConnection) { $localRequestConnection->write($message); + return; } diff --git a/app/Server/Http/Controllers/TunnelMessageController.php b/app/Server/Http/Controllers/TunnelMessageController.php index 0cd224a..57f26b2 100644 --- a/app/Server/Http/Controllers/TunnelMessageController.php +++ b/app/Server/Http/Controllers/TunnelMessageController.php @@ -98,7 +98,7 @@ protected function sendRequestToClient(Request $request, ControlConnection $cont $psrHttpFactory = new PsrHttpFactory($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory); $request = $psrHttpFactory->createRequest($request); - $httpConnection->getConnection()->on('data', function($d) use ($proxy) { + $httpConnection->getConnection()->on('data', function ($d) use ($proxy) { $proxy->send(new Frame($d, true, Frame::OP_BINARY)); });