Return-Path: Delivered-To: apmail-incubator-couchdb-commits-archive@locus.apache.org Received: (qmail 71309 invoked from network); 5 Aug 2008 17:15:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Aug 2008 17:15:42 -0000 Received: (qmail 85454 invoked by uid 500); 5 Aug 2008 17:15:37 -0000 Delivered-To: apmail-incubator-couchdb-commits-archive@incubator.apache.org Received: (qmail 85420 invoked by uid 500); 5 Aug 2008 17:15:37 -0000 Mailing-List: contact couchdb-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-commits@incubator.apache.org Received: (qmail 85383 invoked by uid 99); 5 Aug 2008 17:15:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 10:15:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 17:14:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 80A4823889BB; Tue, 5 Aug 2008 10:15:17 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r682809 - /incubator/couchdb/trunk/src/couchdb/couch_httpd.erl Date: Tue, 05 Aug 2008 17:15:17 -0000 To: couchdb-commits@incubator.apache.org From: damien@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080805171517.80A4823889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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"}).