Skip to content

Commit

Permalink
Added idle timeout client setting
Browse files Browse the repository at this point in the history
  • Loading branch information
trajano committed Jan 30, 2018
1 parent 7ac70b7 commit 0d53367
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
@Configuration
public class ConfigurationProvider {

/**
* Idle timeout, in seconds. zero means don't timeout. This determines if a
* connection will timeout and be closed if no data is received within the
* timeout.
*/
@Value("${http.client.idle_timeout:0}")
private int httpClientIdleTimeout;

@Value("${http.client.max_pool_size:50}")
private int httpClientMaxPoolSize;

Expand All @@ -33,6 +41,7 @@ public class ConfigurationProvider {
public HttpClientOptions httpClientOptions() {

return new HttpClientOptions()
.setIdleTimeout(httpClientIdleTimeout)
.setMaxPoolSize(httpClientMaxPoolSize);
}

Expand Down

0 comments on commit 0d53367

Please sign in to comment.