nestserau
02/07/2019, 2:11 PMinput
gets less than intended, in other words I don’t get the data in its entirety. Via Wireshark I’ve verified that the problem is not on the backend side, I always receive the same amount of bytes via the network interface and the bytes are also the same. But in 1-10% of cases input
is shorter than intended.
private val client = HttpClient()
suspend fun <T> send(...): ... {
val response: HttpResponse
try {
response = <http://client.post|client.post>(url) { body = payload }
} catch (e: Throwable) {
...
}
if (response.status != HttpStatusCode.OK) {
return ...
}
val input = response.readBytes().asUByteArray()
...
}
Thoughts?e5l
02/07/2019, 2:12 PMnestserau
02/07/2019, 2:15 PMcy
02/07/2019, 2:18 PM"org.jetbrains.kotlinx:kotlinx-io:0.1.5-dev-4"
nestserau
02/07/2019, 2:33 PM