diff --git a/src/Engine/Engine.php b/src/Engine/Engine.php index a8bb322..c890b90 100644 --- a/src/Engine/Engine.php +++ b/src/Engine/Engine.php @@ -113,6 +113,9 @@ protected function verify($req, $res, $upgrade, $fn) } $transport = $req->_query['transport']; $sid = isset($req->_query['sid']) ? $req->_query['sid'] : ''; + if ($transport === 'websocket' && empty($sid)) { + return call_user_func($fn, self::ERROR_UNKNOWN_TRANSPORT, false, $req, $res); + } if($sid) { if(!isset($this->clients[$sid]))