Skip to content

Commit

Permalink
Invoke flush before close_write in write_body_and_close.
Browse files Browse the repository at this point in the history
It does not appear guaranteed that `close_write` will flush the underlying
IO buffers, so let's ensure it's flushed.
  • Loading branch information
ioquatix committed Apr 20, 2024
1 parent 115dbf6 commit eb2941c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/protocol/http1/connection.rb
Expand Up @@ -379,6 +379,7 @@ def write_body_and_close(body, head)
end
end

@stream.flush
@stream.close_write
end

Expand Down

0 comments on commit eb2941c

Please sign in to comment.