lib/async/http/body/fixed.rb in async-http-0.31.1 vs lib/async/http/body/fixed.rb in async-http-0.32.0

- old
+ new

@@ -35,14 +35,16 @@ def empty? @remaining == 0 end - def stop(error) + def close(error = nil) if @remaining != 0 @stream.close end + + super end def read if @remaining > 0 if chunk = @stream.read_partial(@remaining) @@ -73,12 +75,14 @@ def empty? @stream.closed? end - def stop(error) + def close(error = nil) # We can't really do anything in this case except close the connection. @stream.close + + super end def read @stream.read_partial end