Skip to content

Commit

Permalink
Fix some issues preventing PR to work
Browse files Browse the repository at this point in the history
  • Loading branch information
bosunski committed Jul 21, 2024
1 parent 28308ab commit f92eabc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/Client/Http/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function performRequest(string $requestData, WebSocket $proxyConnection =

$request = $this->passRequestThroughModifiers(parse_request($requestData), $proxyConnection);

transform($request, function ($request) use ($proxyConnection) {
return transform($request, function ($request) use ($proxyConnection) {
return $this->sendRequestToApplication($request, $proxyConnection);
});
}
Expand Down
2 changes: 0 additions & 2 deletions app/Client/ProxyManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public function createProxy(string $clientId, $connectionData)
$localRequestConnection = null;

$proxyConnection->on('message', function ($message) use (&$localRequestConnection, $proxyConnection, $connectionData) {
$this->performRequest($proxyConnection, (string) $message, $connectionData);

if ($localRequestConnection) {
$localRequestConnection->write($message);
return;
Expand Down
4 changes: 2 additions & 2 deletions app/Server/Http/Controllers/TunnelMessageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ protected function sendRequestToClient(Request $request, ControlConnection $cont

$httpConnection = $this->connectionManager->storeHttpConnection($httpConnection, $requestId);

transform($this->passRequestThroughModifiers($request, $httpConnection), function (Request $request) use ($controlConnection, $requestId) {
$controlConnection->once('proxy_ready_'.$requestId, function (ConnectionInterface $proxy) use ($request) {
transform($this->passRequestThroughModifiers($request, $httpConnection), function (Request $request) use ($httpConnection, $controlConnection, $requestId) {
$controlConnection->once('proxy_ready_'.$requestId, function (ConnectionInterface $proxy) use ($httpConnection, $request) {
// Convert the Laravel request into a PSR7 request
$psr17Factory = new Psr17Factory();
$psrHttpFactory = new PsrHttpFactory($psr17Factory, $psr17Factory, $psr17Factory, $psr17Factory);
Expand Down

0 comments on commit f92eabc

Please sign in to comment.