From 5870636210748e8cd809963a8b6f156f67d7bb05 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Thu, 2 Jan 2025 20:56:46 +0000 Subject: [PATCH] Don't retry pings --- plugin/src/services/sync-service.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin/src/services/sync-service.ts b/plugin/src/services/sync-service.ts index d5f4cbc7..d2c460cd 100644 --- a/plugin/src/services/sync-service.ts +++ b/plugin/src/services/sync-service.ts @@ -19,6 +19,7 @@ export interface CheckConnectionResult { } export class SyncService { private client: Client; + private clientWithoutRetries: Client; public constructor(private readonly database: Database) { this.createClient(database.getSettings()); @@ -41,7 +42,7 @@ export class SyncService { } public async ping(): Promise { - const response = await this.client.GET("/ping", { + const response = await this.clientWithoutRetries.GET("/ping", { params: { header: { authorization: `Bearer ${ @@ -304,5 +305,9 @@ export class SyncService { baseUrl: settings.remoteUri, fetch: retriedFetch, }); + + this.clientWithoutRetries = createClient({ + baseUrl: settings.remoteUri, + }); } }