diff options
Diffstat (limited to 'lib/plum/rack/session.rb')
-rw-r--r-- | lib/plum/rack/session.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/plum/rack/session.rb b/lib/plum/rack/session.rb index d9efb9d..873378e 100644 --- a/lib/plum/rack/session.rb +++ b/lib/plum/rack/session.rb @@ -48,6 +48,7 @@ module Plum @plum.on(:data) { |stream, d| reqs[stream][:data] << d # TODO: store to file? + check_window(stream) } @plum.on(:end_stream) { |stream| @@ -55,6 +56,12 @@ module Plum } end + def check_window(stream) + ws = @plum.local_settings[:initial_window_size] + stream.window_update(ws) if stream.recv_remaining_window < (ws / 2) + @plum.window_update(ws) if @plum.recv_remaining_window < (ws / 2) + end + def send_body(stream, body) begin if body.is_a?(IO) |