Skip to content

Commit

Permalink
Compatibility fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Sep 7, 2024
1 parent 11a8c5b commit 85ebf62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/protocol/http/body/stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,13 @@ def close_read(error = nil)
def close_write(error = nil)
if output = @output
@output = nil
output&.close(error)

# This is a compatibility hack to work around limitations in protocol-rack and can be removed when external tests are passing without it.
if output.method(:close).arity == 1
output.close(error)
else
output.close
end
end
end

Expand Down

0 comments on commit 85ebf62

Please sign in to comment.