Skip to content

Commit d3aa7b7

Browse files
committed
try reverting HttpClientConnectionManager changes
1 parent 48cd403 commit d3aa7b7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

aws-crt-kotlin/native/src/aws/sdk/kotlin/crt/http/HttpClientConnectionManagerNative.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ public actual class HttpClientConnectionManager actual constructor(
135135
public actual suspend fun acquireConnection(): HttpClientConnection =
136136
suspendCoroutine { cont ->
137137
val cb = staticCFunction(::onConnectionAcquired)
138-
StableRef.create(HttpConnectionAcquisitionRequest(cont, this)).use { userdata ->
139-
aws_http_connection_manager_acquire_connection(manager, cb, userdata.asCPointer())
140-
}
138+
val userdata = StableRef.create(HttpConnectionAcquisitionRequest(cont, this))
139+
aws_http_connection_manager_acquire_connection(manager, cb, userdata.asCPointer())
141140
}
142141

143142
/**
@@ -158,7 +157,6 @@ public actual class HttpClientConnectionManager actual constructor(
158157
actual override fun close() {
159158
if (closed.compareAndSet(false, true)) {
160159
aws_http_connection_manager_release(manager)
161-
shutdownCompleteStableRef.dispose()
162160
}
163161
}
164162
}

0 commit comments

Comments
 (0)