Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/async/http/protocol/http1/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def each(task: Task.current)
return
end

begin
task.defer_stop do
# If a response was generated, send it:
if response
trailer = response.headers.trailer!
Expand Down
1 change: 1 addition & 0 deletions lib/async/http/protocol/http2/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def read_in_background(parent: Task.current)

task.annotate("#{version} reading data for #{self.class}.")

# We don't need to defer stop here as this is already a transient task (ignores stop):
begin
while !self.closed?
self.consume_window
Expand Down
2 changes: 1 addition & 1 deletion lib/async/http/protocol/http2/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def each(task: Task.current)

@count += 1

begin
task.defer_stop do
response = yield(request)
rescue
# We need to close the stream if the user code blows up while generating a response:
Expand Down