Browse Source

Fix acceptors getting stuck because of socket errors

We always get the acceptor to resume. The child process will
be killed, and the current code will ignore any EXIT message
when that happens because the pid isn't in the process dictionary.
Loïc Hoguin 8 years ago
parent
commit
a17eb95355
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/ranch_conns_sup.erl

+ 1 - 0
src/ranch_conns_sup.erl

@@ -234,6 +234,7 @@ shoot(State=#state{ref=Ref, transport=Transport, ack_timeout=AckTimeout, max_con
 			%% Only kill the supervised pid, because the connection's pid,
 			%% when different, is supposed to be sitting under it and linked.
 			exit(SupPid, kill),
+			To ! self(),
 			loop(State, CurConns, NbChildren, Sleepers)
 	end.