summaryrefslogtreecommitdiff
path: root/apps/couch/src/couch_event_sup.erl
diff options
context:
space:
mode:
Diffstat (limited to 'apps/couch/src/couch_event_sup.erl')
-rw-r--r--apps/couch/src/couch_event_sup.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/couch/src/couch_event_sup.erl b/apps/couch/src/couch_event_sup.erl
index 6fd6963a..07c48790 100644
--- a/apps/couch/src/couch_event_sup.erl
+++ b/apps/couch/src/couch_event_sup.erl
@@ -50,8 +50,12 @@ stop(Pid) ->
gen_server:cast(Pid, stop).
init({EventMgr, EventHandler, Args}) ->
- ok = gen_event:add_sup_handler(EventMgr, EventHandler, Args),
- {ok, {EventMgr, EventHandler}}.
+ case gen_event:add_sup_handler(EventMgr, EventHandler, Args) of
+ ok ->
+ {ok, {EventMgr, EventHandler}};
+ {stop, Error} ->
+ {stop, Error}
+ end.
terminate(_Reason, _State) ->
ok.