I'm trying to narrow down an issue utilizing ktor ...
# ktor
c
I'm trying to narrow down an issue utilizing ktor HttpClient for many requests where I am getting a
SocketTimeoutException
on my last outgoing http request. Is the proper behavior to explicitly call
close()
on the client after all requests for a given "task" are completed, or to call
close()
after every request? also if anyone has found more doc/examples than this https://ktor.io/clients/http-client.html it would be appreciated 👍
e
Basically it depends on how you process the body. If you use
ByteReadChannel
body, you should close response.
client.close()
just starts the graceful shutdown process
Which client engine do you use?