Don't retry pings
This commit is contained in:
parent
c3781a432e
commit
5870636210
1 changed files with 6 additions and 1 deletions
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue