Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/async/http/protocol/http1/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def each(task: Task.current)
version = request.version

# Same as above:
request = nil unless body
request = nil unless request.body
response = nil

write_body(version, body, head, trailer)
Expand All @@ -98,7 +98,7 @@ def each(task: Task.current)
end

# Gracefully finish reading the request body if it was not already done so.
request&.finish
request&.each{}

# This ensures we yield at least once every iteration of the loop and allow other fibers to execute.
task.yield
Expand All @@ -109,6 +109,7 @@ def each(task: Task.current)
end
end
end

end
end
end
Expand Down