diff options
author | Loïc Hoguin <[email protected]> | 2013-04-02 17:10:15 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-04-02 17:10:15 +0200 |
commit | 8203188155aa9243a4cdcec4962d9b190d2acb5b (patch) | |
tree | 273af2a4069f1aa6d9252b2ae8ffcb28d203738e /src/ranch_server.erl | |
parent | ce81cca5c834b0671af5c40e29462823997f445e (diff) | |
parent | bb9f91b8658ab304a7038bcbca80dd518f53e026 (diff) | |
download | ranch-8203188155aa9243a4cdcec4962d9b190d2acb5b.tar.gz ranch-8203188155aa9243a4cdcec4962d9b190d2acb5b.tar.bz2 ranch-8203188155aa9243a4cdcec4962d9b190d2acb5b.zip |
Merge branch 'server-state-recover' of git://github.com/fishcakez/ranch
Diffstat (limited to 'src/ranch_server.erl')
-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) -> |