We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 153c106 commit 4af8786Copy full SHA for 4af8786
api-client/src/main/kotlin/de/gesellix/docker/remote/api/core/ResponseConsumer.kt
@@ -7,7 +7,7 @@ import kotlinx.coroutines.flow.Flow
7
import kotlinx.coroutines.flow.emptyFlow
8
import kotlinx.coroutines.flow.flow
9
import okhttp3.ResponseBody
10
-import okhttp3.internal.closeQuietly
+import okio.Closeable
11
import okio.appendingSink
12
import okio.buffer
13
import java.io.File
@@ -112,3 +112,12 @@ inline fun <reified T : Any?> ResponseBody.consumeJson(type: Type): T? {
112
// //ignore
113
// }
114
//}
115
+
116
+fun Closeable.closeQuietly() {
117
+ try {
118
+ close()
119
+ } catch (rethrown: RuntimeException) {
120
+ throw rethrown
121
+ } catch (_: Exception) {
122
+ }
123
+}
0 commit comments