Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

because of changes in consul 0.7.3 there is need to not use connection limit in case of long pooling #212

Merged
merged 1 commit into from
Feb 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/main/java/com/orbitz/consul/Consul.java
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ private Retrofit createRetrofit(String url, SSLContext sslContext, HostnameVerif
*/
Dispatcher dispatcher = new Dispatcher(new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(), Util.threadFactory("OkHttp Dispatcher", true)));
dispatcher.setMaxRequests(Integer.MAX_VALUE);
dispatcher.setMaxRequestsPerHost(Integer.MAX_VALUE);
builder.dispatcher(dispatcher);

final URL consulUrl = new URL(url);
Expand Down