From 53026f5b398791546af8cf347af9adf70c1fa23c Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Mon, 26 Oct 2009 17:38:29 +0000 Subject: replication client should use inactivity timeout on changes feed git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@829871 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_rep_changes_feed.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/couchdb/couch_rep_changes_feed.erl b/src/couchdb/couch_rep_changes_feed.erl index 4f56454d..62c8692a 100644 --- a/src/couchdb/couch_rep_changes_feed.erl +++ b/src/couchdb/couch_rep_changes_feed.erl @@ -56,10 +56,11 @@ init([_Parent, #http_db{}=Source, Since, PostProps] = Args) -> Pid = couch_rep_httpc:spawn_link_worker_process(Source), Req = Source#http_db{ resource = "_changes", - qs = [{style, all_docs}, {heartbeat, true}, {since, Since}, + qs = [{style, all_docs}, {heartbeat, 10000}, {since, Since}, {feed, Feed}], conn = Pid, - options = [{stream_to, {self(), once}}, {response_format, binary}], + options = [{stream_to, {self(), once}}, {response_format, binary}, + {inactivity_timeout, 31000}], % miss 3 heartbeats, assume death headers = Source#http_db.headers -- [{"Accept-Encoding", "gzip"}] }, {ibrowse_req_id, ReqId} = couch_rep_httpc:request(Req), @@ -360,7 +361,7 @@ start_http_request(RawUrl) -> {ok, Pid} = ibrowse:spawn_link_worker_process(Url#url.host, Url#url.port), Opts = [ {stream_to, {self(), once}}, - {inactivity_timeout, 30000}, + {inactivity_timeout, 31000}, {response_format, binary} ], {ibrowse_req_id, Id} = -- cgit v1.2.3