Skip to content

Commit

Permalink
perf(http): improve handle connection upgraded to websocket.
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 16, 2023
1 parent dc41aff commit 73017df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions http/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,10 @@ local function handle_connection(con, handler)
return false
end

if resp.code == M.STATUS_SWITCHING_PROTOCOLS then
return false
end

if not resp.head_sent then
send_http_head(resp)
end
Expand Down

0 comments on commit 73017df

Please sign in to comment.