Skip to content

Commit

Permalink
修复 WebSocket 和 Http 共用端口时会有 notice 级别信息的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Mar 19, 2020
1 parent a152fef commit 6717f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Server/WebSocket/Middleware/HandShakeMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6717f82

Please sign in to comment.