aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gun.erl6
-rw-r--r--src/gun_http.erl6
-rw-r--r--src/gun_http2.erl4
-rw-r--r--src/gun_ws.erl2
4 files changed, 7 insertions, 11 deletions
diff --git a/src/gun.erl b/src/gun.erl
index ddd38c8..c596764 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -758,7 +758,7 @@ flush_pid(ServerPid) ->
receive
{gun_up, ServerPid, _} ->
flush_pid(ServerPid);
- {gun_down, ServerPid, _, _, _, _} ->
+ {gun_down, ServerPid, _, _, _} ->
flush_pid(ServerPid);
{gun_inform, ServerPid, _, _, _} ->
flush_pid(ServerPid);
@@ -1423,8 +1423,8 @@ disconnect(State0=#state{owner=Owner, status=Status, opts=Opts,
%% We closed the socket, discard any remaining socket events.
disconnect_flush(State),
%% @todo Stop keepalive timeout, flush message.
- {KilledStreams, UnprocessedStreams} = Protocol:down(ProtoState),
- Owner ! {gun_down, self(), Protocol:name(), Reason, KilledStreams, UnprocessedStreams},
+ KilledStreams = Protocol:down(ProtoState),
+ Owner ! {gun_down, self(), Protocol:name(), Reason, KilledStreams},
Retry = maps:get(retry, Opts, 5),
case Retry of
0 when Reason =:= normal ->
diff --git a/src/gun_http.erl b/src/gun_http.erl
index 80c83bb..a220d75 100644
--- a/src/gun_http.erl
+++ b/src/gun_http.erl
@@ -701,14 +701,12 @@ stream_info(#http_state{streams=Streams}, StreamRef) ->
{ok, undefined}
end.
-%% HTTP does not provide any way to figure out what streams are unprocessed.
down(#http_state{streams=Streams}) ->
- KilledStreams = [case Ref of
+ [case Ref of
{connect, Ref2, _} -> Ref2;
#websocket{ref=Ref2} -> Ref2;
_ -> Ref
- end || #stream{ref=Ref} <- Streams],
- {KilledStreams, []}.
+ end || #stream{ref=Ref} <- Streams].
error_stream_closed(State, StreamRef, ReplyTo) ->
ReplyTo ! {gun_error, self(), StreamRef, {badstate,
diff --git a/src/gun_http2.erl b/src/gun_http2.erl
index bbc76ab..6a443e3 100644
--- a/src/gun_http2.erl
+++ b/src/gun_http2.erl
@@ -724,10 +724,8 @@ stream_info(State, StreamRef) ->
{ok, undefined}
end.
-%% @todo Add unprocessed streams when GOAWAY handling is done.
down(#http2_state{streams=Streams}) ->
- KilledStreams = [Ref || #stream{ref=Ref} <- Streams],
- {KilledStreams, []}.
+ [Ref || #stream{ref=Ref} <- Streams].
connection_error(#http2_state{socket=Socket, transport=Transport,
http2_machine=HTTP2Machine, streams=Streams},
diff --git a/src/gun_ws.erl b/src/gun_ws.erl
index 15c4a81..a2271a9 100644
--- a/src/gun_ws.erl
+++ b/src/gun_ws.erl
@@ -291,4 +291,4 @@ ws_send([Frame|Tail], State, ReplyTo, EvHandler, EvHandlerState0) ->
%% Websocket has no concept of streams.
down(_) ->
- {[], []}.
+ [].