diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ranch_server.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ranch_server.erl b/src/ranch_server.erl index d827ae2..7557d53 100644 --- a/src/ranch_server.erl +++ b/src/ranch_server.erl @@ -114,7 +114,9 @@ count_connections(Ref) -> %% @private init([]) -> - {ok, #state{}}. + Monitors = [{{erlang:monitor(process, Pid), Pid}, Ref} || + [Ref, Pid] <- ets:match(?TAB, {{conns_sup, '$1'}, '$2'})], + {ok, #state{monitors=Monitors}}. %% @private handle_call({set_new_listener_opts, Ref, MaxConns, Opts}, _, State) -> |