aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_conns_sup.erl
diff options
context:
space:
mode:
authorjuhlig <[email protected]>2019-02-20 17:41:31 +0100
committerLoïc Hoguin <[email protected]>2019-04-29 13:27:23 +0200
commitdabf62792c2af08c4c6d36177546695356c33b3a (patch)
treefcbe4ac851f9e3c7965e9446d8f68e9855b5fb56 /src/ranch_conns_sup.erl
parent012ee216f918b435859616b99d945f4038ce14b9 (diff)
downloadranch-dabf62792c2af08c4c6d36177546695356c33b3a.tar.gz
ranch-dabf62792c2af08c4c6d36177546695356c33b3a.tar.bz2
ranch-dabf62792c2af08c4c6d36177546695356c33b3a.zip
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.
Diffstat (limited to 'src/ranch_conns_sup.erl')
-rw-r--r--src/ranch_conns_sup.erl2
1 files changed, 1 insertions, 1 deletions
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),