Skip to content

Commit 61c7735

Browse files
authored
Fixed bug that server shutdown when parse request failed for websocket server. (#4687)
1 parent 618c693 commit 61c7735

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ public function onHandShake(SwooleRequest $request, SwooleResponse $response): v
160160
Context::set(WsContext::FD, $fd);
161161
$security = $this->container->get(Security::class);
162162

163-
$psr7Request = $this->initRequest($request);
164163
$psr7Response = $this->initResponse();
164+
$psr7Request = $this->initRequest($request);
165165

166166
$this->logger->debug(sprintf('WebSocket: fd[%d] start a handshake request.', $fd));
167167

0 commit comments

Comments
 (0)