Fix websocket service disconnect on invalid handshake (#7447)
This commit is contained in:
@@ -345,7 +345,7 @@ class websocket_server {
|
||||
}
|
||||
}
|
||||
if (!preg_match("/Sec-WebSocket-Key: (.*)\r\n/", $request_header, $matches)) {
|
||||
throw new \RuntimeException("Invalid WebSocket handshake");
|
||||
throw new \invalid_handshake_exception($socket, "Invalid WebSocket handshake");
|
||||
}
|
||||
$key = trim($matches[1]);
|
||||
$accept_key = base64_encode(
|
||||
|
||||
Reference in New Issue
Block a user