From 54eb24137c540abe7a16e95a727a1ee2178aedaf Mon Sep 17 00:00:00 2001 From: SKINMAKER Date: Wed, 26 Apr 2023 20:42:51 +0900 Subject: [PATCH] fix: webhook retry interval shifted by 1 (#558) * fix: webhook retry interval shifted by 1 * chore: update docs --- api-docs | 2 +- utils/Webhook.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api-docs b/api-docs index 8b77196..aaba2fc 160000 --- a/api-docs +++ b/api-docs @@ -1 +1 @@ -Subproject commit 8b77196572399132ae3d9c10d27f5269ad819d39 +Subproject commit aaba2fcc953a4e4d3cfb205c0aa90d3eb271d727 diff --git a/utils/Webhook.ts b/utils/Webhook.ts index 2c043ae..a4fafd5 100644 --- a/utils/Webhook.ts +++ b/utils/Webhook.ts @@ -31,7 +31,7 @@ async function sendRequest({ const isBot = payload.type === 'bot' if(retryCount) { - await setTimeout(Math.pow(2, retryCount + 2) * 1000) + await setTimeout(Math.pow(2, retryCount + 1) * 1000) } const result = await relayedFetch({ dest: webhook.url,