You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2011/05/30 17:20:57 UTC

svn commit: r1129215 - /couchdb/branches/1.0.x/src/couchdb/couch_rep.erl

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),