couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r682809 - /incubator/couchdb/trunk/src/couchdb/couch_httpd.erl
Date Tue, 05 Aug 2008 17:15:17 GMT
Author: damien
Date: Tue Aug  5 10:15:16 2008
New Revision: 682809

URL: http://svn.apache.org/viewvc?rev=682809&view=rev
Log:
Fixed restart testing by making it far less likely a HTTP client will get a network error
on a restart request.

Modified:
    incubator/couchdb/trunk/src/couchdb/couch_httpd.erl

Modified: incubator/couchdb/trunk/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_httpd.erl?rev=682809&r1=682808&r2=682809&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_httpd.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Tue Aug  5 10:15:16 2008
@@ -141,8 +141,9 @@
     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"}).



Mime
View raw message