You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 23:07:08 UTC

[34/50] git commit: Replace heartbeat in continuous feed with timeout

Replace heartbeat in continuous feed with timeout

BugzID: 17662


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/317131b9
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/317131b9
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/317131b9

Branch: refs/heads/import
Commit: 317131b9f7380313f1a17e90ff85b4c9c0b4793a
Parents: 7915756
Author: Bob Dionne <bo...@cloudant.com>
Authored: Wed Feb 27 09:16:55 2013 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:41 2013 -0500

----------------------------------------------------------------------
 src/couch_replicator_api_wrap.erl | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/317131b9/src/couch_replicator_api_wrap.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_api_wrap.erl b/src/couch_replicator_api_wrap.erl
index 1b15d60..cad384a 100644
--- a/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator_api_wrap.erl
@@ -321,9 +321,8 @@ update_docs(Db, DocList, Options, UpdateType) ->
     {ok, bulk_results_to_errors(DocList, Result, UpdateType)}.
 
 
-changes_since(#httpdb{headers = Headers1} = HttpDb, Style, StartSeq,
-    UserFun, Options) ->
-    HeartBeat = erlang:max(1000, HttpDb#httpdb.timeout div 3),
+changes_since(#httpdb{headers = Headers1, timeout = Timeout} = HttpDb,
+              Style, StartSeq, UserFun, Options) ->
     BaseQArgs = case get_value(continuous, Options, false) of
     false ->
         [{"feed", "normal"}];
@@ -331,8 +330,8 @@ changes_since(#httpdb{headers = Headers1} = HttpDb, Style, StartSeq,
         [{"feed", "continuous"}]
     end ++ [
         {"style", atom_to_list(Style)}, {"since", ?JSON_ENCODE(StartSeq)},
-        {"heartbeat", integer_to_list(HeartBeat)}
-    ],
+        {"timeout", integer_to_list(Timeout)}
+           ],
     DocIds = get_value(doc_ids, Options),
     {QArgs, Method, Body, Headers} = case DocIds of
     undefined ->