diff options
author | Loïc Hoguin <[email protected]> | 2014-03-21 10:54:28 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-03-21 10:54:28 +0100 |
commit | 0c63c747f06b730ec8b80f9cc16717f160adc6a2 (patch) | |
tree | c97ff02504d3587861fcb1bce90c2ca1018ec81c /src/gun.erl | |
parent | a81d8cbbbd79b3883bb5531c67f964ac613a4cfd (diff) | |
download | gun-0c63c747f06b730ec8b80f9cc16717f160adc6a2.tar.gz gun-0c63c747f06b730ec8b80f9cc16717f160adc6a2.tar.bz2 gun-0c63c747f06b730ec8b80f9cc16717f160adc6a2.zip |
Change the error name when there has been too many retries
'gone' is more explicit than 'too_many_retries'.
Diffstat (limited to 'src/gun.erl')
-rw-r--r-- | src/gun.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gun.erl b/src/gun.erl index 7121324..38cb68a 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -374,9 +374,9 @@ connect(State=#state{owner=Owner, host=Host, port=Port, type=Type}, Retries) -> retry_loop(State, Retries - 1) end. -%% Too many failures, give up. +%% Too many retries, give up. retry_loop(_, 0) -> - error(too_many_retries); + error(gone); retry_loop(State=#state{parent=Parent, retry_timeout=RetryTimeout}, Retries) -> _ = erlang:send_after(RetryTimeout, self(), retry), receive |