From 28b750650ad952ed32f56590d0ab6b0d1e643128 Mon Sep 17 00:00:00 2001 From: "Muhd.dev" Date: Fri, 23 Oct 2026 14:01:47 +0100 Subject: [PATCH] fix: Reconnect Grace Period (#480) --- microservices/api-gateway/src/config/configuration.ts | 5 +++++ microservices/api-gateway/src/proxy/proxy.module.ts | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/microservices/api-gateway/src/config/configuration.ts b/microservices/api-gateway/src/config/configuration.ts index 577092ac..dace265c 100644 --- a/microservices/api-gateway/src/config/configuration.ts +++ b/microservices/api-gateway/src/config/configuration.ts @@ -151,4 +151,9 @@ export default () => ({ healthCheck: { interval: parseInt(process.env.HEALTH_CHECK_INTERVAL, 10) || 30000, }, + + reconnect: { + gracePeriodMs: + parseInt(process.env.RECONNECT_GRACE_PERIOD_MS, 10) || 30000, + }, }); diff --git a/microservices/api-gateway/src/proxy/proxy.module.ts b/microservices/api-gateway/src/proxy/proxy.module.ts index ab8b0bc1..d30bf23d 100644 --- a/microservices/api-gateway/src/proxy/proxy.module.ts +++ b/microservices/api-gateway/src/proxy/proxy.module.ts @@ -3,10 +3,16 @@ import { ProxyController } from './proxy.controller'; import { ProxyService } from './proxy.service'; import { RouteResolverService } from './route-resolver.service'; import { CustomThrottlerGuard } from './custom-throttler.guard'; +import { ReconnectGraceService } from './reconnect-grace.service'; @Module({ controllers: [ProxyController], - providers: [ProxyService, RouteResolverService, CustomThrottlerGuard], - exports: [ProxyService], + providers: [ + ProxyService, + RouteResolverService, + CustomThrottlerGuard, + ReconnectGraceService, + ], + exports: [ProxyService, ReconnectGraceService], }) export class ProxyModule { }