lib/httpx/connection/http2.rb in httpx-0.8.0 vs lib/httpx/connection/http2.rb in httpx-0.8.1
- old
+ new
@@ -34,10 +34,12 @@
# waiting for WINDOW_UPDATE frames
return :r if @buffer.full?
return :w if @connection.state == :closed
- return :r unless (@connection.state == :connected && @handshake_completed)
+ unless (@connection.state == :connected && @handshake_completed)
+ return @buffer.empty? ? :r : :rw
+ end
return :w unless @pending.empty?
return :w if @streams.each_key.any? { |r| r.interests == :w }