lib/http/protocol/http2/connection.rb in http-protocol-0.6.0 vs lib/http/protocol/http2/connection.rb in http-protocol-0.6.1

- old
+ new

@@ -109,10 +109,11 @@ attr :streams def read_frame frame = @framer.read_frame(@local_settings.maximum_frame_size) # puts "#{self.class} #{@state} read_frame: class=#{frame.class} flags=#{frame.flags} length=#{frame.length}" + # puts "Windows: local_window=#{@local_window.inspect}; remote_window=#{@remote_window.inspect}" yield frame if block_given? frame.apply(self) @@ -169,17 +170,19 @@ end end def update_local_settings(changes) capacity = @local_settings.initial_window_size + @streams.each_value do |stream| stream.local_window.capacity = capacity end end def update_remote_settings(changes) capacity = @remote_settings.initial_window_size + @streams.each_value do |stream| stream.remote_window.capacity = capacity end end @@ -208,12 +211,9 @@ return false end end def open! - @local_window.capacity = self.local_settings.initial_window_size - @remote_window.capacity = self.remote_settings.initial_window_size - @state = :open return self end