Skip to content

Commit ef8b8e0

Browse files
committed
Fix handling of @remote_stream_id.
1 parent fa52b70 commit ef8b8e0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/protocol/http2/connection.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ def initialize(framer, local_stream_id)
4141
@dependencies = {0 => @dependency}
4242

4343
@framer = framer
44+
4445
# The next stream id to use:
4546
@local_stream_id = local_stream_id
47+
48+
# The biggest remote stream id seen thus far:
4649
@remote_stream_id = 0
4750

4851
@local_settings = PendingSettings.new
@@ -438,14 +441,14 @@ def closed_stream_id?(id)
438441
if @local_stream_id.even?
439442
id < @local_stream_id
440443
else
441-
id < @remote_stream_id
444+
id <= @remote_stream_id
442445
end
443446
elsif id.odd?
444447
# Client-initiated streams are odd.
445448
if @local_stream_id.odd?
446449
id < @local_stream_id
447450
else
448-
id < @remote_stream_id
451+
id <= @remote_stream_id
449452
end
450453
end
451454
end

0 commit comments

Comments
 (0)