couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [20/50] git commit: Fix code_change function
Date Fri, 17 Jan 2014 22:06:54 GMT
Fix code_change function

BugzID: 14132


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/50f1edb1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/50f1edb1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/50f1edb1

Branch: refs/heads/import
Commit: 50f1edb16006ff66bc32fada9b771f4465cb6635
Parents: f994f35
Author: Adam Kocoloski <adam@cloudant.com>
Authored: Wed Aug 15 14:29:03 2012 -0400
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Wed Mar 20 06:02:38 2013 -0500

----------------------------------------------------------------------
 src/couch_replicator_httpc_pool.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/50f1edb1/src/couch_replicator_httpc_pool.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_httpc_pool.erl b/src/couch_replicator_httpc_pool.erl
index f8e2fda..ddfb94b 100644
--- a/src/couch_replicator_httpc_pool.erl
+++ b/src/couch_replicator_httpc_pool.erl
@@ -153,8 +153,10 @@ handle_info({'DOWN', Ref, process, _, _}, #state{callers = Callers} =
State) ->
         handle_cast({release_worker, Worker}, State)
     end.
 
+code_change(_OldVsn, OldState, _Extra) when tuple_size(OldState) =:= 6 ->
+    {ok, erlang:append_element(OldState, ets:new(callers))};
 code_change(_OldVsn, State, _Extra) ->
-    {ok, State#state{callers = ets:new(callers,[set])}}.
+    {ok, State}.
 
 
 terminate(_Reason, State) ->


Mime
View raw message