Skip to content

Commit 1d3e312

Browse files
committed
Twelve: Api: Fix leakage
Change-Id: I3773b1dfeb10663f2d5dc7d4073ee713efc72a94
1 parent c5f20ec commit 1d3e312

File tree

1 file changed

+1
-1
lines changed
  • app/src/main/java/org/lineageos/twelve/utils

1 file changed

+1
-1
lines changed

app/src/main/java/org/lineageos/twelve/utils/Api.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Api(
120120
) = withContext(dispatcher) {
121121
withRetry(maxAttempts = 3) {
122122
runCatching {
123-
okHttpClient.newCall(request).executeAsync().let { response ->
123+
okHttpClient.newCall(request).executeAsync().use { response ->
124124
if (response.isSuccessful) {
125125
response.body?.use { body ->
126126
val string = body.string()

0 commit comments

Comments
 (0)