aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2020-02-27 15:26:31 +0100
committerLoïc Hoguin <[email protected]>2020-02-27 15:26:31 +0100
commitf4e846e534667100a64ce142cb93b8974438fbe3 (patch)
tree2c60e6c86b716a3021b27b78ce1a49f28108c4f0
parent59d99d7d67fbab6db877ab9a6441b003490edfaa (diff)
downloadgun-f4e846e534667100a64ce142cb93b8974438fbe3.tar.gz
gun-f4e846e534667100a64ce142cb93b8974438fbe3.tar.bz2
gun-f4e846e534667100a64ce142cb93b8974438fbe3.zip
Fix crashes from missing clause
-rw-r--r--src/gun_http2.erl2
1 files changed, 2 insertions, 0 deletions
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 ->