From dabf62792c2af08c4c6d36177546695356c33b3a Mon Sep 17 00:00:00 2001 From: juhlig Date: Wed, 20 Feb 2019 17:41:31 +0100 Subject: Fix repeated removal of connections Due to a typo, repeated calls to ranch:remove_connection/1 from a worker process would crash the respective ranch_conns_sup. --- src/ranch_conns_sup.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ranch_conns_sup.erl b/src/ranch_conns_sup.erl index fe2237a..d19405b 100644 --- a/src/ranch_conns_sup.erl +++ b/src/ranch_conns_sup.erl @@ -145,7 +145,7 @@ loop(State=#state{parent=Parent, ref=Ref, conn_type=ConnType, case put(Pid, removed) of active -> loop(State, CurConns - 1, NbChildren, Sleepers); - remove -> + removed -> loop(State, CurConns, NbChildren, Sleepers); undefined -> _ = erase(Pid), -- cgit v1.2.3