Skip to content

Commit 06f036e

Browse files
fix(client): bump max requests per host to max requests (5 -> 64)
1 parent 1c65ca5 commit 06f036e

File tree

1 file changed

+5
-0
lines changed
  • onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp

1 file changed

+5
-0
lines changed

onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OkHttpClient.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpC
211211
.callTimeout(timeout.request())
212212
.proxy(proxy)
213213
.build()
214+
.apply {
215+
// We usually make all our requests to the same host so it makes sense to
216+
// raise the per-host limit to the overall limit.
217+
dispatcher.maxRequestsPerHost = dispatcher.maxRequests
218+
}
214219
)
215220
}
216221
}

0 commit comments

Comments
 (0)