Просмотр исходного кода

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 лет назад
Родитель
Сommit
a17eb95355
1 измененных файлов с 1 добавлено и 0 удалено
  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.