From e24e9d0a9e96f73cb2cd5e8e6050ecc6f632e68e Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Sat, 26 Apr 2025 15:23:30 +0300 Subject: [PATCH] fix(core/http): remove got internal retry (#690) * fix(core/http): remove got internal retry * feat(protocol/brokeprotocolmaster): remove repeated default options in http request * docs: add changelog line * docs: credit contributor for the bug find --- CHANGELOG.md | 1 + protocols/brokeprotocolmaster.js | 3 +-- protocols/core.js | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d5c5ff..489058c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## To Be Released... ## 5.X.Y +* Fix: HTTP requests would end up making more retries than needed due to got's internal retry mechanism (#690, thanks @RattleSN4K3) ## 5.3.0 * Docs: Arma Reforger query setup note (#670, thanks @xCausxn) diff --git a/protocols/brokeprotocolmaster.js b/protocols/brokeprotocolmaster.js index 99c052a..f243b80 100644 --- a/protocols/brokeprotocolmaster.js +++ b/protocols/brokeprotocolmaster.js @@ -128,8 +128,7 @@ export default class brokeprotocolmaster extends Core { try { await this.request({ url: this.backendApiUriCheck, - method: 'HEAD', - retry: { limit: 0 } // TODO: #650 remove this + method: 'HEAD' }) return true diff --git a/protocols/core.js b/protocols/core.js index c03d5d9..1528bc1 100644 --- a/protocols/core.js +++ b/protocols/core.js @@ -316,6 +316,9 @@ export default class Core extends EventEmitter { ...params, timeout: { request: this.options.socketTimeout + }, + retry: { + limit: 0 } }) this.logger.debug(log => {