aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-08-27 18:55:33 +0200
committerLoïc Hoguin <[email protected]>2013-08-27 18:55:33 +0200
commit02a173259022fba7533ddb4239f962321066f875 (patch)
treec94ca7d1717237e65dda3904ba1c408ad3e6a270
parent6d0914901e92a35f121ac63ffdda2500bd9fff8e (diff)
downloadranch-02a173259022fba7533ddb4239f962321066f875.tar.gz
ranch-02a173259022fba7533ddb4239f962321066f875.tar.bz2
ranch-02a173259022fba7533ddb4239f962321066f875.zip
Print an error if the supervisor receives an unexpected message
-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 396f5fe..e16df69 100644
--- a/src/ranch_conns_sup.erl
+++ b/src/ranch_conns_sup.erl
@@ -179,7 +179,11 @@ loop(State=#state{parent=Parent, ref=Ref, conn_type=ConnType,
loop(State, CurConns, NbChildren, Sleepers);
{'$gen_call', {To, Tag}, _} ->
To ! {Tag, {error, ?MODULE}},
- loop(State, CurConns, NbChildren, Sleepers)
+ loop(State, CurConns, NbChildren, Sleepers);
+ Msg ->
+ error_logger:error_msg(
+ "Ranch listener ~p received unexpected message ~p~n",
+ [Ref, Msg])
end.
system_continue(_, _, {State, CurConns, NbChildren, Sleepers}) ->