aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-08-27 18:52:53 +0200
committerLoïc Hoguin <[email protected]>2013-08-27 18:52:53 +0200
commit6d0914901e92a35f121ac63ffdda2500bd9fff8e (patch)
treee738961245419c6cb197b071c83a848b3a3c2d38
parent0da3b24b3f123f4871fe2701aa9963f4a8e2855b (diff)
downloadranch-6d0914901e92a35f121ac63ffdda2500bd9fff8e.tar.gz
ranch-6d0914901e92a35f121ac63ffdda2500bd9fff8e.tar.bz2
ranch-6d0914901e92a35f121ac63ffdda2500bd9fff8e.zip
Close the socket if no child process was started
-rw-r--r--src/ranch_conns_sup.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ranch_conns_sup.erl b/src/ranch_conns_sup.erl
index ab79ef1..396f5fe 100644
--- a/src/ranch_conns_sup.erl
+++ b/src/ranch_conns_sup.erl
@@ -124,6 +124,7 @@ loop(State=#state{parent=Parent, ref=Ref, conn_type=ConnType,
end;
_ ->
To ! self(),
+ Transport:close(Socket),
loop(State, CurConns, NbChildren, Sleepers)
end;
{?MODULE, active_connections, To, Tag} ->