Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore management frames for a period after closing a connection #140

Merged
merged 4 commits into from
Aug 31, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions spec/connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,13 @@
expect { @conn.new_stream }.to raise_error(ConnectionClosed)
end

it 'should not raise error when receiving connection management frames after closing' do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"should not raise error when receiving connection management frames immediately after emitting goaway"?

Any merit in wiring up tests for one or two other types of frames?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just added.

@conn.goaway
expect(@conn).to be_closed

expect { @conn << f.generate(PING.dup) }.not_to raise_error(ProtocolError)
end

it 'should process connection management frames after GOAWAY' do
@conn << f.generate(SETTINGS.dup)
@conn << f.generate(HEADERS.dup)
Expand Down