Optimize work with curl.

Do not close curl connection after each request.