Requests using HTTP/1.1 and keepalive can fail with socket_closed_remotely if keepalive connection is closed.
Added retry to handle connection closing. Retry set to 3 to avoid infinite loop.
Only HTTP/1.1 bug I have found is: http://erlang.org/pipermail/erlang-bugs/2015-March/004862.html
And it can be avoided by using retries.
Requests using HTTP/1.1 and keepalive can fail with socket_closed_remotely if keepalive connection is closed. Added retry to handle connection closing. Retry set to 3 to avoid infinite loop. Only HTTP/1.1 bug I have found is: http://erlang.org/pipermail/erlang-bugs/2015-March/004862.html And it can be avoided by using retries.