From 480d48a5dc6becb4aeb88f61e688deccaa9a1caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 19 Jun 2013 16:37:07 +0200 Subject: Fix which_children call which returned incorrect values Not everything stored in the process dictionary is a pid, because we use proc_lib. Thanks to the cool spanish girl at the EUC 2013 for highlighting this issue, and sorry I forgot your name. --- src/ranch_conns_sup.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ranch_conns_sup.erl') diff --git a/src/ranch_conns_sup.erl b/src/ranch_conns_sup.erl index 2964b8b..0ab4427 100644 --- a/src/ranch_conns_sup.erl +++ b/src/ranch_conns_sup.erl @@ -163,7 +163,7 @@ loop(State=#state{parent=Parent, ref=Ref, conn_type=ConnType, {'$gen_call', {To, Tag}, which_children} -> Pids = get_keys(true), Children = [{Protocol, Pid, ConnType, [Protocol]} - || Pid <- Pids], + || Pid <- Pids, is_pid(Pid)], To ! {Tag, Children}, loop(State, CurConns, NbChildren, Sleepers); {'$gen_call', {To, Tag}, count_children} -> -- cgit v1.2.3