From cf873f14501d409c93bc3ff120b35a323ebd8c53 Mon Sep 17 00:00:00 2001 From: Nelson Vides Date: Tue, 26 Nov 2024 17:00:28 +0100 Subject: [PATCH] timeouts are not needed when delay has been configured to infinity --- src/throttle/amoc_throttle_process.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/throttle/amoc_throttle_process.erl b/src/throttle/amoc_throttle_process.erl index 4ce30894..a0a21025 100644 --- a/src/throttle/amoc_throttle_process.erl +++ b/src/throttle/amoc_throttle_process.erl @@ -146,7 +146,7 @@ maybe_stop_timer(#state{tref = TRef}) -> consume_all_timer_ticks(delay_between_executions). timeout(#state{delay_between_executions = infinity}) -> - ?DEFAULT_MSG_TIMEOUT; + infinity; timeout(#state{delay_between_executions = Delay}) -> Delay + ?DEFAULT_MSG_TIMEOUT.