Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Return {ok, State} from handle_config_change/5
This is a fixup commit for COUCHDB-3102.
config_listener expects either remove_handler or {ok, State} from the
callback module.

COUCHDB-3102
  • Loading branch information
iilyak committed Sep 2, 2016
1 parent 68c6a0e commit e984486a1ea4a35387200db61b1d7b49b01801d6
Showing 1 changed file with 5 additions and 5 deletions.
@@ -56,7 +56,7 @@ handle_config_change("global_changes", "max_event_delay", MaxDelayStr, _, _) ->
catch error:badarg ->
ok
end,
ok;
{ok, nil};

handle_config_change("global_changes", "max_write_delay", MaxDelayStr, _, _) ->
try list_to_integer(MaxDelayStr) of
@@ -65,20 +65,20 @@ handle_config_change("global_changes", "max_write_delay", MaxDelayStr, _, _) ->
catch error:badarg ->
ok
end,
ok;
{ok, nil};

handle_config_change("global_changes", "update_db", "false", _, _) ->
gen_server:cast(?LISTENER, {set_update_db, false}),
gen_server:cast(?SERVER, {set_update_db, false}),
ok;
{ok, nil};

handle_config_change("global_changes", "update_db", _, _, _) ->
gen_server:cast(?LISTENER, {set_update_db, true}),
gen_server:cast(?SERVER, {set_update_db, true}),
ok;
{ok, nil};

handle_config_change(_, _, _, _, _) ->
ok.
{ok, nil}.

handle_config_terminate(_Server, _Reason, _State) ->
ok.

0 comments on commit e984486

Please sign in to comment.