feat: increase timeouts

This commit is contained in:
kastov 2025-03-04 03:40:56 +03:00
parent 722eb238cd
commit dd4a95f4e5
No known key found for this signature in database
GPG key ID: 1B27BE29057F4C90

View file

@ -84,8 +84,6 @@ export class XrayService implements OnApplicationBootstrap, OnModuleInit {
const fullConfig = generateApiConfig(config);
this.logger.debug(JSON.stringify(fullConfig, null, 2));
if (this.configEqualChecking) {
this.logger.log('Getting config checksum...');
const newChecksum = this.getConfigChecksum(fullConfig);
@ -132,7 +130,7 @@ export class XrayService implements OnApplicationBootstrap, OnModuleInit {
reject: false,
all: true,
cleanup: true,
timeout: 20_000,
timeout: 60_000,
lines: true,
});
@ -145,8 +143,6 @@ export class XrayService implements OnApplicationBootstrap, OnModuleInit {
isStarted = await this.getXrayInternalStatus();
}
this.logger.debug(`isStarted: ${isStarted}`);
if (!isStarted) {
this.isXrayOnline = false;
@ -328,7 +324,7 @@ export class XrayService implements OnApplicationBootstrap, OnModuleInit {
}
private async getXrayInternalStatus(): Promise<boolean> {
const maxRetries = 3;
const maxRetries = 8;
const delay = 2000;
for (let attempt = 0; attempt < maxRetries; attempt++) {