[Library | new-theme]: timeout-interceptor.service.ts: Increased server and client timeout time when environment != production.

data-transfer-v2
Konstantina Galouni 2 years ago
parent d43f576d40
commit fd9794ec3a

@ -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));
}

Loading…
Cancel
Save