summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2008-08-05 17:15:16 +0000
committerDamien F. Katz <damien@apache.org>2008-08-05 17:15:16 +0000
commitd721ef270cf548e2d217c471da44d0c31054ed98 (patch)
treeefda296facc66d7ea03c365d62cad670ee71c183
parent6cd122dc9de1bc599973ee834dbba3d97ff10d51 (diff)
Fixed restart testing by making it far less likely a HTTP client will get a network error on a restart request.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@682809 13f79535-47bb-0310-9956-ffa450edef68
-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"}).