Skip to content

Commit

Permalink
Prefer single line responsibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 21, 2024
1 parent f80180b commit ed274a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/protocol/http2/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def read_connection_preface(settings = [])
send_settings(settings)

read_frame do |frame|
raise ProtocolError, "First frame must be #{SettingsFrame}, but got #{frame.class}" unless frame.is_a? SettingsFrame
unless frame.is_a? SettingsFrame
raise ProtocolError, "First frame must be #{SettingsFrame}, but got #{frame.class}"
end
end
else
raise ProtocolError, "Cannot read connection preface in state #{@state}"
Expand Down

0 comments on commit ed274a7

Please sign in to comment.