diff options
author | Damien F. Katz <damien@apache.org> | 2008-08-05 17:15:16 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-08-05 17:15:16 +0000 |
commit | d721ef270cf548e2d217c471da44d0c31054ed98 (patch) | |
tree | efda296facc66d7ea03c365d62cad670ee71c183 /src/couchdb | |
parent | 6cd122dc9de1bc599973ee834dbba3d97ff10d51 (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
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 5 |
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"}). |