Skip to content

Commit ed274a7

Browse files
committed
Prefer single line responsibility.
1 parent f80180b commit ed274a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/protocol/http2/server.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ def read_connection_preface(settings = [])
3131
send_settings(settings)
3232

3333
read_frame do |frame|
34-
raise ProtocolError, "First frame must be #{SettingsFrame}, but got #{frame.class}" unless frame.is_a? SettingsFrame
34+
unless frame.is_a? SettingsFrame
35+
raise ProtocolError, "First frame must be #{SettingsFrame}, but got #{frame.class}"
36+
end
3537
end
3638
else
3739
raise ProtocolError, "Cannot read connection preface in state #{@state}"

0 commit comments

Comments
 (0)