aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_http2.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-10-31 09:24:24 +0100
committerLoïc Hoguin <[email protected]>2018-10-31 09:24:24 +0100
commit45b024969072dcf46d448d01f76bf859792a29f7 (patch)
tree42318f785586767dcdb6c3153fcd760300cd867c /src/gun_http2.erl
parent871989eef53663285c165fdfb83a5918ebe00d41 (diff)
downloadgun-45b024969072dcf46d448d01f76bf859792a29f7.tar.gz
gun-45b024969072dcf46d448d01f76bf859792a29f7.tar.bz2
gun-45b024969072dcf46d448d01f76bf859792a29f7.zip
Fix the error sent when we receive an RST_STREAM
Diffstat (limited to 'src/gun_http2.erl')
-rw-r--r--src/gun_http2.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index a562e59..8d8e93d 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -199,7 +199,8 @@ trailers_frame(State, StreamID, Trailers) ->
rst_stream_frame(State=#http2_state{streams=Streams0}, StreamID, Reason) ->
case lists:keytake(StreamID, #stream.id, Streams0) of
{value, #stream{ref=StreamRef, reply_to=ReplyTo}, Streams} ->
- ReplyTo ! {gun_error, self(), StreamRef, Reason},
+ ReplyTo ! {gun_error, self(), StreamRef,
+ {stream_error, Reason, 'Stream reset by server.'}},
State#http2_state{streams=Streams};
false ->
State