From 08d0b59fa3016635024250082c7c0fe6e930df9e Mon Sep 17 00:00:00 2001 From: "T.Todua" <7117978+ttodua@users.noreply.github.com> Date: Wed, 27 Jul 2022 21:44:02 +0400 Subject: [PATCH] timeout fix --- js/base/functions/time.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/base/functions/time.js b/js/base/functions/time.js index 19e7a1bd35e7..28357b858d0a 100644 --- a/js/base/functions/time.js +++ b/js/base/functions/time.js @@ -18,9 +18,9 @@ const uuidv1 = () => { const setTimeout_original = setTimeout; const setTimeout_safe = (done, ms, setTimeout = setTimeout_original /* overrideable for mocking purposes */, targetTime = now () + ms) => { - // avoid MAX_INT issue https://stackoverflow.com/questions/60474110 + // avoid MAX_INT issue https://github.com/ccxt/ccxt/issues/10761 if (ms >= 2147483647) { - throw new Exception ('setTimeout() function was called with unrealistic value of ' + ms.toString ()); + throw new Error ('setTimeout() function was called with unrealistic value of ' + ms.toString ()); } // The built-in setTimeout function can fire its callback earlier than specified, so we // need to ensure that it does not happen: sleep recursively until `targetTime` is reached...