You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2018/01/26 20:55:14 UTC

[couchdb] 01/05: Fix bug when canceling replications

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch elixir-suite-davisp
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit d35fea2d35db3e33f0feb3b418ca20c47b329977
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Jan 25 16:49:10 2018 -0600

    Fix bug when canceling replications
---
 src/chttpd/src/chttpd_misc.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_misc.erl b/src/chttpd/src/chttpd_misc.erl
index 15eabbf..09e7d87 100644
--- a/src/chttpd/src/chttpd_misc.erl
+++ b/src/chttpd/src/chttpd_misc.erl
@@ -205,7 +205,9 @@ cancel_replication(PostBody, Ctx) ->
             {error, badrpc};
         Else ->
             % Unclear what to do here -- pick the first error?
-            hd(Else)
+            % Except try ignoring any {error, not_found} responses
+            % because we'll always get two of those
+            hd(Else -- [{error, not_found}])
         end
     end.
 

-- 
To stop receiving notification emails like this one, please contact
davisp@apache.org.