From 99242f3342f24f447e487aee6cbf909fcfce9fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 26 Nov 2013 14:22:10 +0100 Subject: Add accept_ack on all transports and ack_timeout transport option Doing this in the connection process allows us to free acceptors to start accepting more connections quicker, especially under load. --- src/ranch.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ranch.erl') diff --git a/src/ranch.erl b/src/ranch.erl index 2db4921..9bcd328 100644 --- a/src/ranch.erl +++ b/src/ranch.erl @@ -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. %% -- cgit v1.2.3