Skip to content

Commit

Permalink
Run Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
peckb1 committed Apr 24, 2024
1 parent 04774b8 commit 8c4a64e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,13 +384,14 @@ class RealConnection(
}
}

private fun getMaximumAllocationLimit() : Int {
private fun getMaximumAllocationLimit(): Int {
// if we have not negotiated a max per streams yet, don't check for the policy override
val negotiatedMaxCurrentStreams = lastMaxConcurrentStreamsFromSettings ?: return 1

val maxPolicyValue = connectionPool.getPolicy(route.address)
?.maximumConcurrentCallsPerConnection
?: Int.MAX_VALUE
val maxPolicyValue =
connectionPool.getPolicy(route.address)
?.maximumConcurrentCallsPerConnection
?: Int.MAX_VALUE

return min(maxPolicyValue, negotiatedMaxCurrentStreams)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ class ConnectionPoolTest {
assertThat(pool.connectionCount()).isEqualTo(3)
}


private fun setPolicy(
pool: RealConnectionPool,
address: Address,
Expand Down

0 comments on commit 8c4a64e

Please sign in to comment.