From 6717f829c0d079849ba1131357b28b34a188d86e Mon Sep 17 00:00:00 2001 From: Yurun Date: Thu, 19 Mar 2020 17:43:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20WebSocket=20=E5=92=8C=20Ht?= =?UTF-8?q?tp=20=E5=85=B1=E7=94=A8=E7=AB=AF=E5=8F=A3=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E6=9C=89=20notice=20=E7=BA=A7=E5=88=AB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Server/WebSocket/Middleware/HandShakeMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Server/WebSocket/Middleware/HandShakeMiddleware.php b/src/Server/WebSocket/Middleware/HandShakeMiddleware.php index bd7c3a46c1..1f28392335 100644 --- a/src/Server/WebSocket/Middleware/HandShakeMiddleware.php +++ b/src/Server/WebSocket/Middleware/HandShakeMiddleware.php @@ -26,7 +26,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface { /** @var \Imi\Server\Http\Route\RouteResult $routeResult */ $routeResult = RequestContext::get('routeResult'); - if($routeResult->routeItem->wsConfig->wsOnly) + if($routeResult->routeItem->wsConfig->wsOnly ?? false) { $response = $response->withStatus(StatusCode::BAD_REQUEST); }