aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plum/flow_control.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plum/flow_control.rb')
-rw-r--r--lib/plum/flow_control.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/plum/flow_control.rb b/lib/plum/flow_control.rb
index f28fa3a..4b7ef79 100644
--- a/lib/plum/flow_control.rb
+++ b/lib/plum/flow_control.rb
@@ -9,7 +9,7 @@ module Plum
# Sends frame respecting inner-stream flow control.
# @param frame [Frame] The frame to be sent.
def send(frame)
- if frame.type == :data
+ if Frame::Data === frame
@send_buffer << frame
if @send_remaining_window < frame.length
if Stream === self
@@ -62,7 +62,7 @@ module Plum
end
def consume_recv_window(frame)
- if frame.type == :data
+ if Frame::Data === frame
@recv_remaining_window -= frame.length
if @recv_remaining_window < 0
local_error = (Connection === self) ? RemoteConnectionError : RemoteStreamError