From: Jérôme Benoit Date: Wed, 6 Oct 2021 07:07:43 +0000 (+0200) Subject: Fix callback invocation in promiseWithTimeout() X-Git-Tag: v1.1.26~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ed0f83800d2e1f68b82a233dee91745ba4031cfb;p=e-mobility-charging-stations-simulator.git Fix callback invocation in promiseWithTimeout() Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 6133177f..50240126 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -244,7 +244,7 @@ export default class Utils { // Create a timeout promise that rejects in timeout milliseconds const timeoutPromise = new Promise((_, reject) => { setTimeout(() => { - timeoutCallback; + timeoutCallback(); reject(timeoutError); }, timeoutMs); });