lib/httpx/connection.rb in httpx-0.6.4 vs lib/httpx/connection.rb in httpx-0.6.5

- old
+ new

@@ -252,12 +252,11 @@ return if @state == :closing || @state == :closed end end def send_pending - while !@write_buffer.full? && (req_args = @pending.shift) - request = req_args + while !@write_buffer.full? && (request = @pending.shift) parser.send(request) end end def parser @@ -366,10 +365,10 @@ error = error.to_connection_error if connecting? end parser.handle_error(error) if @parser && parser.respond_to?(:handle_error) - @pending.each do |request| + while (request = @pending.shift) request.emit(:response, ErrorResponse.new(request, error, @options)) end end end end