lib/protocol/http1/body/remainder.rb in protocol-http1-0.24.0 vs lib/protocol/http1/body/remainder.rb in protocol-http1-0.25.0

- old
+ new

@@ -37,11 +37,15 @@ end def read @connection&.readpartial(BLOCK_SIZE) rescue EOFError - @connection.receive_end_stream! - @connection = nil + if connection = @connection + @connection = nil + connection.receive_end_stream! + end + + return nil end def inspect "\#<#{self.class} state=#{@connection ? 'open' : 'closed'}>" end