lib/httpx/resolver/native.rb in httpx-0.13.1 vs lib/httpx/resolver/native.rb in httpx-0.13.2

- old
+ new

@@ -99,11 +99,11 @@ when :closed transition(:idle) transition(:open) end - !@write_buffer.empty? || @queries.empty? ? :w : :r + calculate_interests end def <<(connection) return if early_resolve(connection) @@ -125,13 +125,17 @@ @timeouts.values_at(*hosts).reject(&:empty?).map(&:first).min end private + def calculate_interests + !@write_buffer.empty? || @queries.empty? ? :w : :r + end + def consume - dread + dread if calculate_interests == :r do_retry - dwrite + dwrite if calculate_interests == :w end def do_retry return if @queries.empty?