Author: kocolosk
Date: Mon Oct 26 17:38:29 2009
New Revision: 829871
URL: http://svn.apache.org/viewvc?rev=829871&view=rev
Log:
replication client should use inactivity timeout on changes feed
Modified:
couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl
Modified: couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl
URL:
http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl?rev=829871&r1=829870&r2=829871&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl (original)
+++ couchdb/trunk/src/couchdb/couch_rep_changes_feed.erl Mon Oct 26 17:38:29
2009
@@ -56,10 +56,11 @@
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 @@
{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} =