Properly closes http client to avoid single-connection conflict