summaryrefslogtreecommitdiff
path: root/apps/couch/src/couch_event_sup.erl
diff options
context:
space:
mode:
authorRobert Newson <robert.newson@cloudant.com>2011-06-13 14:59:55 +0100
committerRobert Newson <robert.newson@cloudant.com>2011-06-13 14:59:55 +0100
commite9a5a6f90a021db1db8a7e55ec797a4c86edcad6 (patch)
tree06d0c28969cfcf54b2f137e7407b097f73aa0f21 /apps/couch/src/couch_event_sup.erl
parent266ba88ac6ded40087e0211ad9e75e4ce64e66cb (diff)
parent3c1a0d7e2c9adef4f8b20c9df205a86e5c0feefb (diff)
Merge CouchDB 1.1
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.