Skip to content

Commit a978fcf

Browse files
committed
Handle full hijack without NoMethodError.
1 parent 46b98f3 commit a978fcf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/async/http/protocol/http1/server.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ def each(task: Task.current)
6161
while request = next_request
6262
response = yield(request, self)
6363
body = response&.body
64-
64+
65+
if @stream.nil? and body.nil?
66+
# Full hijack.
67+
return
68+
end
69+
6570
begin
6671
# If a response was generated, send it:
6772
if response

0 commit comments

Comments
 (0)