diff options
Diffstat (limited to 'src/gun_http.erl')
-rw-r--r-- | src/gun_http.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gun_http.erl b/src/gun_http.erl index e2b37d1..81310bf 100644 --- a/src/gun_http.erl +++ b/src/gun_http.erl @@ -18,7 +18,7 @@ -export([name/0]). -export([init/4]). -export([handle/2]). --export([close/1]). +-export([close/2]). -export([keepalive/1]). -export([request/8]). -export([request/9]). @@ -304,10 +304,11 @@ send_data_if_alive(Data, State=#http_state{streams=[Stream=#stream{ send_data_if_alive(_, State, _) -> State. -close(State=#http_state{in=body_close, streams=[_|Tail]}) -> +%% @todo Use Reason. +close(_, State=#http_state{in=body_close, streams=[_|Tail]}) -> _ = send_data_if_alive(<<>>, State, fin), close_streams(Tail); -close(#http_state{streams=Streams}) -> +close(_, #http_state{streams=Streams}) -> close_streams(Streams). close_streams([]) -> |