Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Make pb connect timeout configurable #509

Merged
merged 1 commit into from

2 participants

@pavlobaron

Patch for issue #3978

@kellymclaughlin kellymclaughlin merged commit c404aa1 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. @pavlobaron
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/riak_cs_riakc_pool_worker.erl
View
8 src/riak_cs_riakc_pool_worker.erl
@@ -45,7 +45,13 @@ riak_host_port() ->
-spec start_link(term()) -> {ok, pid()} | {error, term()}.
start_link(_Args) ->
{Host, Port} = riak_host_port(),
- riakc_pb_socket:start_link(Host, Port, [{connect_timeout, 10000}]).
+ case application:get_env(riak_cs, riakc_connect_timeout) of
+ {ok, Timeout} ->
+ ok;
+ undefined ->
+ Timeout = 10000
+ end,
+ riakc_pb_socket:start_link(Host, Port, [{connect_timeout, Timeout}]).
stop(undefined) ->
ok;
Something went wrong with that request. Please try again.