[client] Close client socket when with-http-connection exits