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:09 UTC

[35/50] git commit: Ensure _changes terminates before inactivity_timeout

Ensure _changes terminates before inactivity_timeout

This will allow the replicator to reconnect cleanly instead of
considering the request a failure.


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

Branch: refs/heads/import
Commit: a18f8e9eb49a488800a647b9f032b0d405318c79
Parents: 317131b
Author: Adam Kocoloski <ad...@cloudant.com>
Authored: Thu Feb 28 16:51:09 2013 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:41 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/a18f8e9e/src/couch_replicator_api_wrap.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_api_wrap.erl b/src/couch_replicator_api_wrap.erl
index cad384a..01b9b68 100644
--- a/src/couch_replicator_api_wrap.erl
+++ b/src/couch_replicator_api_wrap.erl
@@ -321,8 +321,9 @@ update_docs(Db, DocList, Options, UpdateType) ->
     {ok, bulk_results_to_errors(DocList, Result, UpdateType)}.
 
 
-changes_since(#httpdb{headers = Headers1, timeout = Timeout} = HttpDb,
+changes_since(#httpdb{headers = Headers1, timeout = InactiveTimeout} = HttpDb,
               Style, StartSeq, UserFun, Options) ->
+    Timeout = erlang:max(1000, InactiveTimeout - 5000),
     BaseQArgs = case get_value(continuous, Options, false) of
     false ->
         [{"feed", "normal"}];