diff --git a/app/livechat/server/lib/Livechat.js b/app/livechat/server/lib/Livechat.js index 027e163d6bb5..08d8151f2509 100644 --- a/app/livechat/server/lib/Livechat.js +++ b/app/livechat/server/lib/Livechat.js @@ -734,9 +734,9 @@ export const Livechat = { } catch (e) { Livechat.webhookLogger.error(`Response error on ${ 11 - attempts } try ->`, e); // try 10 times after 10 seconds each - Livechat.webhookLogger.warn('Will try again in 10 seconds ...'); + (attempts - 1) && Livechat.webhookLogger.warn('Will try again in 10 seconds ...'); setTimeout(Meteor.bindEnvironment(function() { - Livechat.sendRequest(postData, callback, attempts--); + Livechat.sendRequest(postData, callback, attempts - 1); }), 10000); } },