I used okhttp library to call API Calls on a website of mine based on WordPress. In that call, I forgot to close connection in the end and called various endpoints on the loop. Next morning I saw that the CPU and RAM usage was still high even after 6 hours of performing calls, which led me to infer that the possibility is that I forgot to close the connections and when I checked I saw I forgot to call response.body().close()
Now here is am thinking, doesn't the server close the connection automatically and release resources after a certain time if I don't close connection manually?
Evacuate the building! Here, take this tiny ad with you:
ScroogeXHTML 8.0 - RTF to HTML5 and XHTML converter