aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-12-07 14:19:49 +0100
committerLoïc Hoguin <[email protected]>2013-12-07 14:19:49 +0100
commit366cb0a6df123ed9b128966dba6b64993e88b60a (patch)
tree07e1eaa641e7e45867d9845cc38d43e4f268b741
parent13675b588377d182b304a02d2556c12d767d6c44 (diff)
downloadranch-366cb0a6df123ed9b128966dba6b64993e88b60a.tar.gz
ranch-366cb0a6df123ed9b128966dba6b64993e88b60a.tar.bz2
ranch-366cb0a6df123ed9b128966dba6b64993e88b60a.zip
Add an error report when a connection process fails to start
Becoming closer to a standard supervisor everyday.
-rw-r--r--src/ranch_conns_sup.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ranch_conns_sup.erl b/src/ranch_conns_sup.erl
index e1ddbca..308a1ab 100644
--- a/src/ranch_conns_sup.erl
+++ b/src/ranch_conns_sup.erl
@@ -128,8 +128,12 @@ loop(State=#state{parent=Parent, ref=Ref, conn_type=ConnType,
loop(State, CurConns2, NbChildren + 1,
[To|Sleepers])
end;
- _ ->
+ Ret ->
To ! self(),
+ error_logger:error_msg(
+ "Ranch listener ~p connection process start failure; "
+ "~p:start_link/4 returned: ~999999p~n",
+ [Ref, Protocol, Ret]),
Transport:close(Socket),
loop(State, CurConns, NbChildren, Sleepers)
end;