summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_httpd.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/couchdb/couch_httpd.erl')
-rw-r--r--src/couchdb/couch_httpd.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl
index d1a4fa90..86e41f8b 100644
--- a/src/couchdb/couch_httpd.erl
+++ b/src/couchdb/couch_httpd.erl
@@ -141,8 +141,9 @@ handle_replicate_request(_Req, _Method) ->
throw({method_not_allowed, "POST"}).
handle_restart_request(Req, 'POST') ->
- couch_server:remote_restart(),
- send_json(Req, {obj, [{ok, true}]});
+ Response = send_json(Req, {obj, [{ok, true}]}),
+ spawn(fun() -> couch_server:remote_restart() end),
+ Response;
handle_restart_request(_Req, _Method) ->
throw({method_not_allowed, "POST"}).