From f4e846e534667100a64ce142cb93b8974438fbe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 27 Feb 2020 15:26:31 +0100 Subject: Fix crashes from missing clause --- src/gun_http2.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gun_http2.erl b/src/gun_http2.erl index 990d08c..3b92286 100644 --- a/src/gun_http2.erl +++ b/src/gun_http2.erl @@ -150,11 +150,13 @@ parse(Data0, State0=#http2_state{buffer=Buffer, parse_state=PS}) -> {ok, Frame, Rest} when PS =:= normal -> case frame(Frame, State0) of close -> close; + Error = {error, _} -> Error; State1 -> parse(Rest, State1) end; {ok, Frame, Rest} when element(1, PS) =:= continuation -> case continuation_frame(Frame, State0) of close -> close; + Error = {error, _} -> Error; State1 -> parse(Rest, State1) end; {ignore, _} when element(1, PS) =:= continuation -> -- cgit v1.2.3