Skip to content

Commit

Permalink
Whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 14, 2024
1 parent e8d1b82 commit b14afb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/async/http/protocol/http1/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def each(task: Task.current)
# If a response was generated, send it:
if response
trailer = response.headers.trailer!

write_response(@version, response.status, response.headers)

# Some operations in this method are long running, that is, it's expected that `body.call(stream)` could literally run indefinitely. In order to facilitate garbage collection, we want to nullify as many local variables before calling the streaming body. This ensures that the garbage collection can clean up as much state as possible during the long running operation, so we don't retain objects that are no longer needed.

if body and protocol = response.protocol
Expand All @@ -89,7 +89,7 @@ def each(task: Task.current)

write_body(version, body, head, trailer)
end

# We are done with the body, you shouldn't need to call close on it:
body = nil
else
Expand Down

0 comments on commit b14afb7

Please sign in to comment.