http2 connection: removed interests calculation traversing requests

the traversal seems unnnecessary, given the subsequent cheaper checks. A
request with a stream will always be writable unless it's done, or is
expecting a 1xx response; however, there'll be drains in place, and
that's a cheaper check.
This commit is contained in:
HoneyryderChuck 2021-08-05 22:52:48 +01:00
parent 59755d7d01
commit 48a2d82c34

View File

@ -56,7 +56,7 @@ module HTTPX
return :w if !@pending.empty? && can_buffer_more_requests?
return :w if @streams.each_key.any? { |r| r.interests == :w }
return :w unless @drains.empty?
if @buffer.empty?
return if @streams.empty? && @pings.empty?