Skip to content

Commit 7237553

Browse files
committed
update ktor (fix linux curl engine issue)
1 parent 897ce2d commit 7237553

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ targetSdk = "35"
77
agp = "8.7.3"
88
kotlin = "2.1.10"
99
mockk = "1.13.16"
10-
ktor = "3.1.0"
10+
ktor = "3.2.2"
1111
coroutine = "1.10.1"
1212
compose = "1.7.8"
1313

kmp-socketio/src/commonMain/kotlin/com/piasy/kmp/socketio/engineio/transports/transport.kt

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,8 @@ class DefaultHttpClientFactory(
7979
}
8080
// Linux curl engine doesn't work for simultaneous websocket and http request.
8181
// see https://youtrack.jetbrains.com/issue/KTOR-8259/
82-
// Use two http client could work around it.
83-
private val httpClient: HttpClient = if (!Platform.isLinux) wsClient else httpClient(
84-
trustAllCerts = trustAllCerts,
85-
) {
86-
install(Logging) {
87-
logger = object : Logger {
88-
override fun log(message: String) {
89-
com.piasy.kmp.xlog.Logging.info("Net", message)
90-
}
91-
}
92-
level = LogLevel.ALL
93-
}
94-
install(WebSockets) {
95-
pingIntervalMillis = 20_000
96-
}
97-
}
82+
// But it's fixed in 3.2.0.
83+
private val httpClient: HttpClient = wsClient
9884

9985
override suspend fun createWs(
10086
url: String,

0 commit comments

Comments
 (0)