https://kotlinlang.org logo
#ktor
Title
# ktor
m

Marc Knaup

10/12/2020, 10:42 AM
How do I clean up resources after completing a call without closing the entire
HttpClient
?
HttpResponse.close()
is deprecated. With CIO I get
BindException: Can't assign requested address
under high load which is probably due to some (temporary?) resource leak.
e

e5l

10/12/2020, 10:43 AM
Hey, the
HttpResponse
is in memory, so you don't need cleanup any resources.
Could you describe what kind of leak do you have?
m

Marc Knaup

10/12/2020, 10:46 AM
This test randomly either freezes or throws the `BindException`: https://gist.github.com/fluidsonic/510f0df9c77d70d72793f92cced04ab2 Reported: https://youtrack.jetbrains.com/issue/KTOR-1126
e

e5l

10/12/2020, 10:47 AM
Thanks!, We will take a look
🙏 1
m

Marc Knaup

10/12/2020, 11:05 AM
While you’re at it 😄 Apache & Jetty engines are highly unstable too, probably for the same reason. https://youtrack.jetbrains.com/issue/KTOR-717 https://youtrack.jetbrains.com/issue/KTOR-1120