From fd9794ec3aa5fd031a3642febf4c2a4d20425cd7 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 3 Aug 2022 18:30:25 +0300 Subject: [PATCH] [Library | new-theme]: timeout-interceptor.service.ts: Increased server and client timeout time when environment != production. --- timeout-interceptor.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/timeout-interceptor.service.ts b/timeout-interceptor.service.ts index f4737a45..0ed59b2b 100644 --- a/timeout-interceptor.service.ts +++ b/timeout-interceptor.service.ts @@ -19,7 +19,9 @@ export class TimeoutInterceptor implements HttpInterceptor { return next.handle(req); } - const timeoutValue = isPlatformServer(this.platformId)?3000:6000;//req.headers.get('timeout') || this.defaultTimeout; + let serverTime = properties.environment == "production" ? 3000 : 4000; + let clientTime = properties.environment == "production" ? 6000 : 12000; + const timeoutValue = isPlatformServer(this.platformId)?serverTime:clientTime;//req.headers.get('timeout') || this.defaultTimeout; const timeoutValueNumeric = Number(timeoutValue); return next.handle(req).pipe(timeout(timeoutValueNumeric)); }