aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-03-21 10:54:28 +0100
committerLoïc Hoguin <[email protected]>2014-03-21 10:54:28 +0100
commit0c63c747f06b730ec8b80f9cc16717f160adc6a2 (patch)
treec97ff02504d3587861fcb1bce90c2ca1018ec81c
parenta81d8cbbbd79b3883bb5531c67f964ac613a4cfd (diff)
downloadgun-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'.
-rw-r--r--src/gun.erl4
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