aleksey.tomin
11/17/2020, 10:40 AMval response = <http://httpClient.post|httpClient.post><T>(url) {
contentType(ContentType.Application.Json)
body = "some json"
}
This code executed on windows ~1 sec but on macOS - first request < 1 sec but next ~ 15 sec.
kotlin 1.4.10, ktor 1.4.2, io.ktor:ktor-client-curl
and others.
How can I look up a problem?e5l
11/17/2020, 10:46 AMaleksey.tomin
11/17/2020, 10:47 AMe5l
11/17/2020, 10:48 AMjaguililla
11/17/2020, 12:09 PMaleksey.tomin
11/17/2020, 12:48 PMval app = NSApplication.sharedApplication
...
app.run()
by
val app = NSApplication.sharedApplication
...
app.finishLaunching()
while (active.value) {
app.nextEventMatchingMask(NSEventMaskAny, null, NSDefaultRunLoopMode, true)?.let {
app.sendEvent(it)
}
runBlocking {
delay(100.milliseconds)
}
}
and fix the problem. It’s not a ktor bug.
But it can be useful.