aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun.erl')
-rw-r--r--src/gun.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gun.erl b/src/gun.erl
index 8a101a7..d808750 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -98,6 +98,7 @@
-export([start_link/4]).
-export([callback_mode/0]).
-export([init/1]).
+-export([default_transport/1]).
-export([not_connected/3]).
-export([domain_lookup/3]).
-export([connecting/3]).
@@ -321,7 +322,7 @@ do_open(Host, Port, Opts0) ->
case check_options(maps:to_list(Opts)) of
ok ->
Result = case maps:get(supervise, Opts, true) of
- true -> supervisor:start_child(gun_sup, [self(), Host, Port, Opts]);
+ true -> supervisor:start_child(gun_conns_sup, [self(), Host, Port, Opts]);
false -> start_link(self(), Host, Port, Opts)
end,
case Result of
@@ -508,7 +509,7 @@ intermediaries_info([Intermediary=#{transport := Transport0}|Tail], Acc) ->
-spec close(pid()) -> ok.
close(ServerPid) ->
- supervisor:terminate_child(gun_sup, ServerPid).
+ supervisor:terminate_child(gun_conns_sup, ServerPid).
-spec shutdown(pid()) -> ok.
shutdown(ServerPid) ->
@@ -832,6 +833,8 @@ await_up(ServerPid, Timeout, MRef) ->
{error, timeout}
end.
+%% Flushing gun messages.
+
-spec flush(pid() | stream_ref()) -> ok.
flush(ServerPid) when is_pid(ServerPid) ->
flush_pid(ServerPid);