summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2011-05-30 12:47:56 +0000
committerRobert Newson <rnewson@apache.org>2011-05-30 12:47:56 +0000
commit3c1a0d7e2c9adef4f8b20c9df205a86e5c0feefb (patch)
tree953fab74c6571ee22e3c01ea7865f9a571e52476
parente064893f3fd5460a94e77566328818cf84de3517 (diff)
parent79f3866adc9289e66b6092e4bdda3198369e09e4 (diff)
downloadcouchdb-1.1.0.tar.gz
tagging 1.1.01.1.0
git-svn-id: https://svn.apache.org/repos/asf/couchdb/tags/1.1.0@1129145 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/test/replication.js4
-rw-r--r--src/couchdb/couch_rep.erl10
2 files changed, 10 insertions, 4 deletions
diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js
index 5e85847e3..257466259 100644
--- a/share/www/script/test/replication.js
+++ b/share/www/script/test/replication.js
@@ -324,14 +324,14 @@ couchTests.replication = function(debug) {
T(continuousResult._local_id);
var cancelResult = CouchDB.replicate(dbA.name, "test_suite_db_b", {
- body: {"cancel": true}
+ body: {"continuous":true, "cancel": true}
});
T(cancelResult.ok);
T(continuousResult._local_id == cancelResult._local_id);
try {
var cancelResult2 = CouchDB.replicate(dbA.name, "test_suite_db_b", {
- body: {"cancel": true}
+ body: {"continuous":true, "cancel": true}
});
} catch (e) {
T(e.error == "not_found");
diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl
index fd323f7fe..6e4295ea0 100644
--- a/src/couchdb/couch_rep.erl
+++ b/src/couchdb/couch_rep.erl
@@ -84,8 +84,14 @@ end_replication({BaseId, Extension}) ->
{error, not_found} = R ->
R;
ok ->
- ok = supervisor:delete_child(couch_rep_sup, RepId),
- {ok, {cancelled, ?l2b(BaseId)}}
+ case supervisor:delete_child(couch_rep_sup, RepId) of
+ ok ->
+ {ok, {cancelled, ?l2b(BaseId)}};
+ {error, not_found} ->
+ {ok, {cancelled, ?l2b(BaseId)}};
+ {error, _} = Error ->
+ Error
+ end
end.
start_replication(RepDoc, {BaseId, Extension}, UserCtx) ->