summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Kocoloski <kocolosk@apache.org>2009-10-26 17:38:29 +0000
committerAdam Kocoloski <kocolosk@apache.org>2009-10-26 17:38:29 +0000
commit53026f5b398791546af8cf347af9adf70c1fa23c (patch)
tree649fdc2b5c38954b4a860469cc81c83c64e70435 /src
parent0f575441b4938e75068b88c7e32698de3e3af9df (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/couchdb/couch_rep_changes_feed.erl7
1 files 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} =