couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject svn commit: r1129215 - /couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
Date Mon, 30 May 2011 15:20:57 GMT
Author: rnewson
Date: Mon May 30 15:20:56 2011
New Revision: 1129215

URL: http://svn.apache.org/viewvc?rev=1129215&view=rev
Log:
supervisor:delete_child returns {error,not_found) after a successful terminated_child in R14B03

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

Modified: couchdb/branches/1.0.x/src/couchdb/couch_rep.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/src/couchdb/couch_rep.erl?rev=1129215&r1=1129214&r2=1129215&view=diff
==============================================================================
--- couchdb/branches/1.0.x/src/couchdb/couch_rep.erl (original)
+++ couchdb/branches/1.0.x/src/couchdb/couch_rep.erl Mon May 30 15:20:56 2011
@@ -78,8 +78,14 @@ replicate({Props}=PostBody, UserCtx) ->
         {error, not_found} ->
      {error, not_found};
         ok ->
-     ok = supervisor:delete_child(couch_rep_sup, BaseId ++ Extension),
-            {ok, {cancelled, ?l2b(BaseId)}}
+     case supervisor:delete_child(couch_rep_sup, BaseId ++ Extension) of
+         ok ->
+             {ok, {cancelled, ?l2b(BaseId)}};
+         {error, not_found} ->
+             {ok, {cancelled, ?l2b(BaseId)}};
+         {error, _} = Error ->
+             Error
+     end
  end;
     false ->
         Server = start_replication_server(Replicator),



Mime
View raw message