Skip to content
Permalink
Browse files
Allow multiple listeners per callback module
Useful for couch_rep_httpc.

BugzID: 13179
  • Loading branch information
kocolosk committed Feb 27, 2013
1 parent a6d02d5 commit 81d558e990aee3cebce260ab6da9bed3540a7bcb
Showing 1 changed file with 5 additions and 1 deletion.
@@ -4,6 +4,7 @@

%% Public interface
-export([start/2]).
-export([start/3]).

-export([behaviour_info/1]).

@@ -17,7 +18,10 @@ behaviour_info(_) ->
undefined.

start(Module, State) ->
gen_event:add_sup_handler(config_event, {?MODULE, Module}, {Module, State}).
start(Module, Module, State).

start(Module, Id, State) ->
gen_event:add_sup_handler(config_event, {?MODULE, Id}, {Module, State}).

init({Module, State}) ->
{ok, {Module, State}}.

0 comments on commit 81d558e

Please sign in to comment.