diff --git a/src/Conn.php b/src/Conn.php index fc4f6ba4..7c1d962a 100644 --- a/src/Conn.php +++ b/src/Conn.php @@ -40,7 +40,7 @@ public function hasBuffer() public function send($data) { - dump($this->connection->write($data)); + $this->connection->write($data); return $this; } diff --git a/src/HttpServer.php b/src/HttpServer.php index 63a21b47..6ccf7ee2 100644 --- a/src/HttpServer.php +++ b/src/HttpServer.php @@ -57,9 +57,9 @@ protected function handleRequest(string $data, Conn $connection) $negotiator = new ServerNegotiator(new RequestVerifier); $response = $negotiator->handshake($request); - $connection = new WsConnection($connection); + $connection->write(Message::toString($response)); - $connection->send(Message::toString($response)); + $connection = new WsConnection($connection); $server = app(Server::class); $reverbConnection = $this->connection($request, $connection);