lib/protocol/http1/body/fixed.rb in protocol-http1-0.24.0 vs lib/protocol/http1/body/fixed.rb in protocol-http1-0.25.0
- old
+ new
@@ -21,21 +21,17 @@
def empty?
@connection.nil? or @remaining == 0
end
- def discard
+ def close(error = nil)
if connection = @connection
@connection = nil
- if @remaining != 0
+ unless @remaining == 0
connection.close_read
end
end
- end
-
- def close(error = nil)
- self.discard
super
end
# @raises EOFError if the connection is closed before the expected length is read.