You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/08/28 19:30:15 UTC
[15/50] [abbrv] couch-replicator commit: updated
refs/heads/1963-eunit-bigcouch to 3cf0b13
Only set an ibrowse request timeout for non-_changes requests
BugzID: 25246
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/f10dec72
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/f10dec72
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/f10dec72
Branch: refs/heads/1963-eunit-bigcouch
Commit: f10dec729805cf63e0c835198fca2253e198c870
Parents: 1746e93
Author: Benjamin Anderson <b...@banjiewen.net>
Authored: Wed Dec 11 11:25:32 2013 -0800
Committer: Robert Newson <rn...@apache.org>
Committed: Tue Jul 29 15:17:28 2014 +0100
----------------------------------------------------------------------
src/couch_replicator_httpc.erl | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/f10dec72/src/couch_replicator_httpc.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_httpc.erl b/src/couch_replicator_httpc.erl
index 0242885..ecd6a3e 100644
--- a/src/couch_replicator_httpc.erl
+++ b/src/couch_replicator_httpc.erl
@@ -69,19 +69,20 @@ send_ibrowse_req(#httpdb{headers = BaseHeaders} = HttpDb, Params) ->
Body = get_value(body, Params, []),
IsChanges = get_value(path, Params) == "_changes",
if IsChanges ->
- {ok, Worker} = ibrowse:spawn_link_worker_process(Url);
+ {ok, Worker} = ibrowse:spawn_link_worker_process(Url),
+ Timeout = infinity;
true ->
- {ok, Worker} = couch_replicator_httpc_pool:get_worker(HttpDb#httpdb.httpc_pool)
+ {ok, Worker} = couch_replicator_httpc_pool:get_worker(HttpDb#httpdb.httpc_pool),
+ Timeout = case config:get("replicator", "request_timeout", "infinity") of
+ "infinity" -> infinity;
+ Milliseconds -> list_to_integer(Milliseconds)
+ end
end,
IbrowseOptions = [
{response_format, binary}, {inactivity_timeout, HttpDb#httpdb.timeout} |
lists:ukeymerge(1, get_value(ibrowse_options, Params, []),
HttpDb#httpdb.ibrowse_options)
],
- Timeout = case config:get("replicator", "request_timeout", "infinity") of
- "infinity" -> infinity;
- Milliseconds -> list_to_integer(Milliseconds)
- end,
Response = ibrowse:send_req_direct(
Worker, Url, Headers2, Method, Body, IbrowseOptions, Timeout),
{Worker, Response, IsChanges}.