couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject svn commit: r1129121 - /couchdb/trunk/src/couchdb/couch_replicator.erl
Date Mon, 30 May 2011 10:51:02 GMT
Author: rnewson
Date: Mon May 30 10:51:02 2011
New Revision: 1129121

URL: http://svn.apache.org/viewvc?rev=1129121&view=rev
Log:
in R14B03, terminated temporary processes are automatically deleted.

Modified:
    couchdb/trunk/src/couchdb/couch_replicator.erl

Modified: couchdb/trunk/src/couchdb/couch_replicator.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_replicator.erl?rev=1129121&r1=1129120&r2=1129121&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_replicator.erl (original)
+++ couchdb/trunk/src/couchdb/couch_replicator.erl Mon May 30 10:51:02 2011
@@ -178,8 +178,14 @@ cancel_replication({BaseId, Extension}) 
     FullRepId = BaseId ++ Extension,
     case supervisor:terminate_child(couch_rep_sup, FullRepId) of
     ok ->
-        ok = supervisor:delete_child(couch_rep_sup, FullRepId),
-        {ok, {cancelled, ?l2b(BaseId)}};
+        case supervisor:delete_child(couch_rep_sup, FullRepId) of
+            ok ->
+                {ok, {cancelled, ?l2b(BaseId)}};
+            {error, not_found} ->
+                {ok, {cancelled, ?l2b(BaseId)}};
+            Error ->
+                Error
+        end;
     Error ->
         Error
     end.



Mime
View raw message