File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,15 @@ setup_update_callback(Expires) when is_binary(Expires) ->
221221setup_update_callback (Expires ) when is_integer (Expires ) ->
222222 setup_callback (Expires - ? ALERT_BEFORE_EXPIRY ).
223223
224- -spec setup_callback (pos_integer ()) -> reference ().
224+ -spec setup_callback (integer ()) -> reference ().
225225setup_callback (Seconds ) ->
226- erlang :send_after (Seconds * 1000 , self (), refresh_credentials ).
226+ erlang :send_after (timeout (Seconds ) * 1000 , self (), refresh_credentials ).
227+
228+ -spec timeout (integer ()) -> pos_integer ().
229+ timeout (Seconds ) when is_integer (Seconds ), Seconds >= 0 ->
230+ Seconds ;
231+ timeout (_ ) ->
232+ ? RETRY_DELAY .
227233
228234-spec seconds_until_timestamp (binary ()) -> integer ().
229235seconds_until_timestamp (Timestamp ) ->
You can’t perform that action at this time.
0 commit comments