Skip to content

Commit 21777c4

Browse files
fix(client): bump max requests per host to max requests (5 -> 64)
1 parent 5d83cd2 commit 21777c4

File tree

1 file changed

+5
-0
lines changed
  • openlayer-java-client-okhttp/src/main/kotlin/com/openlayer/api/client/okhttp

1 file changed

+5
-0
lines changed

openlayer-java-client-okhttp/src/main/kotlin/com/openlayer/api/client/okhttp/OkHttpClient.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC
205205
.callTimeout(timeout.request())
206206
.proxy(proxy)
207207
.build()
208+
.apply {
209+
// We usually make all our requests to the same host so it makes sense to
210+
// raise the per-host limit to the overall limit.
211+
dispatcher.maxRequestsPerHost = dispatcher.maxRequests
212+
}
208213
)
209214
}
210215
}

0 commit comments

Comments
 (0)