aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-11-26 14:22:10 +0100
committerLoïc Hoguin <[email protected]>2013-11-26 14:22:10 +0100
commit99242f3342f24f447e487aee6cbf909fcfce9fdb (patch)
tree7174e2ca193efee7a9d8b48959566b44aa56c642 /src/ranch.erl
parent95bb778f57f55e02bd7fe6f86dfbb4f0a94d6ade (diff)
downloadranch-99242f3342f24f447e487aee6cbf909fcfce9fdb.tar.gz
ranch-99242f3342f24f447e487aee6cbf909fcfce9fdb.tar.bz2
ranch-99242f3342f24f447e487aee6cbf909fcfce9fdb.zip
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.
Diffstat (limited to 'src/ranch.erl')
-rw-r--r--src/ranch.erl4
1 files changed, 3 insertions, 1 deletions
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.
%%