You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val proxyConfig = config.proxySelector.select(request.url)
60
+
61
+
val manager = getManagerForUri(request.uri, proxyConfig)
62
+
var leaseAcquired =false
63
+
64
+
returntry {
65
+
// wait for an actual connection
66
+
val conn = withTimeout(config.connectionAcquireTimeout) {
67
+
// get a permit to acquire a connection (limits overall connections since managers are per/host)
68
+
leases.acquire()
69
+
leaseAcquired =true
70
+
manager.acquireConnection()
71
+
}
72
+
73
+
LeasedConnection(conn)
74
+
} catch (ex:Exception) {
75
+
if (leaseAcquired) {
76
+
leases.release()
77
+
}
78
+
val httpEx =when (ex) {
79
+
isHttpException-> ex
80
+
isTimeoutCancellationException->HttpException("timed out waiting for an HTTP connection to be acquired from the pool", errorCode =HttpErrorCode.CONNECTION_ACQUIRE_TIMEOUT)
Copy file name to clipboardExpand all lines: runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngine.kt
Copy file name to clipboardExpand all lines: runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig.kt
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,11 @@ public class CrtHttpEngineConfig private constructor(builder: Builder) : HttpCli
Copy file name to clipboardExpand all lines: runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/SdkStreamResponseHandler.kt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -207,6 +207,7 @@ internal class SdkStreamResponseHandler(
0 commit comments