From 4c737d9d01005f29619c2186991cc82b2d31c947 Mon Sep 17 00:00:00 2001 From: Robert Newson Date: Mon, 30 May 2011 10:09:29 +0000 Subject: supervisor:delete_child returns ok after a successful terminated_child in R14B03 git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1129107 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep.erl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/couchdb/couch_rep.erl b/src/couchdb/couch_rep.erl index fd323f7f..6e4295ea 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) -> -- cgit v1.2.3