diff options
Diffstat (limited to 'src/ranch.erl')
-rw-r--r-- | src/ranch.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ranch.erl b/src/ranch.erl index 74497f0..641fc4d 100644 --- a/src/ranch.erl +++ b/src/ranch.erl @@ -120,7 +120,7 @@ child_spec(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) andalso is_atom(Protocol) -> {{ranch_listener_sup, Ref}, {ranch_listener_sup, start_link, [ Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts - ]}, permanent, 5000, supervisor, [ranch_listener_sup]}. + ]}, permanent, infinity, supervisor, [ranch_listener_sup]}. %% @doc Acknowledge the accepted connection. %% @@ -128,7 +128,9 @@ child_spec(Ref, NbAcceptors, Transport, TransOpts, Protocol, ProtoOpts) %% the protocol process before starting to use it. -spec accept_ack(ref()) -> ok. accept_ack(Ref) -> - receive {shoot, Ref} -> ok end. + receive {shoot, Ref, Transport, Socket, AckTimeout} -> + Transport:accept_ack(Socket, AckTimeout) + end. %% @doc Remove the calling process' connection from the pool. %% @@ -175,7 +177,7 @@ set_protocol_options(Ref, Opts) -> %% It takes a list of options, a list of allowed keys and an accumulator. %% This accumulator can be used to set default options that should never %% be overriden. --spec filter_options([{atom(), any()} | {atom(), any(), any(), any()}], +-spec filter_options([{atom(), any()} | {raw, any(), any(), any()}], [atom()], Acc) -> Acc when Acc :: [any()]. filter_options([], _, Acc) -> Acc; @@ -200,7 +202,7 @@ set_option_default(Opts, Key, Value) -> end. %% @doc Start the given applications if they were not already started. --spec require(list(module())) -> ok. +-spec require([atom()]) -> ok. require([]) -> ok; require([App|Tail]) -> |