Use httpRequest in favour of WebSocket->request

This commit is contained in:
Chris Boden 2016-02-25 19:19:58 -05:00
parent d97ca0f3cb
commit 5137c2122a

View File

@ -87,11 +87,10 @@ class WsServer implements HttpServerInterface {
throw new \UnexpectedValueException('$request can not be null'); throw new \UnexpectedValueException('$request can not be null');
} }
$conn->httpRequest = $request; // This will replace ->WebSocket->request $conn->httpRequest = $request;
$conn->WebSocket = new \StdClass; $conn->WebSocket = new \StdClass;
$conn->WebSocket->closing = false; $conn->WebSocket->closing = false;
$conn->WebSocket->request = $request; // deprecated
$response = $this->handshakeNegotiator->handshake($request)->withHeader('X-Powered-By', \Ratchet\VERSION); $response = $this->handshakeNegotiator->handshake($request)->withHeader('X-Powered-By', \Ratchet\VERSION);