couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject svn commit: r1129107 - /couchdb/branches/1.1.x/src/couchdb/couch_rep.erl
Date Mon, 30 May 2011 10:09:29 GMT
Author: rnewson
Date: Mon May 30 10:09:29 2011
New Revision: 1129107

URL: http://svn.apache.org/viewvc?rev=1129107&view=rev
Log:
supervisor:delete_child returns ok after a successful terminated_child in R14B03

Modified:
    couchdb/branches/1.1.x/src/couchdb/couch_rep.erl

Modified: couchdb/branches/1.1.x/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/couchdb/couch_rep.erl?rev=1129107&r1=1129106&r2=1129107&view=diff
==============================================================================
--- couchdb/branches/1.1.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/1.1.x/src/couchdb/couch_rep.erl Mon May 30 10:09:29 2011
@@ -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) ->



Mime
View raw message