Don't retry pings

This commit is contained in:
Andras Schmelczer 2025-01-02 20:56:46 +00:00
parent c3781a432e
commit 5870636210
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -19,6 +19,7 @@ export interface CheckConnectionResult {
}
export class SyncService {
private client: Client<paths>;
private clientWithoutRetries: Client<paths>;
public constructor(private readonly database: Database) {
this.createClient(database.getSettings());
@ -41,7 +42,7 @@ export class SyncService {
}
public async ping(): Promise<components["schemas"]["PingResponse"]> {
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<paths>({
baseUrl: settings.remoteUri,
});
}
}