Closed regiskuckaertz closed 6 years ago
Unless you thoroughly read the JavaDoc, OkHttp will only let you know that it's leaking resources by issuing warnings through its own logger.
It turns out not closing responses can exhaust the thread pool allocated to the client and ultimately shut down the whole application.
Here I'm just making sure the resource is cleaned up no matter the outcome of the computation.
👍 Nice, I wonder how many more instances we have of this
I've used http4s in formstack-submitter and I'm not going back ✈️
Unless you thoroughly read the JavaDoc, OkHttp will only let you know that it's leaking resources by issuing warnings through its own logger.
It turns out not closing responses can exhaust the thread pool allocated to the client and ultimately shut down the whole application.
Here I'm just making sure the resource is cleaned up no matter the outcome of the computation.