diff --git a/ts/smartrequest.request.ts b/ts/smartrequest.request.ts index 472430d..465d474 100644 --- a/ts/smartrequest.request.ts +++ b/ts/smartrequest.request.ts @@ -130,13 +130,13 @@ export let request = async ( case parsedUrl.protocol === 'https:' && optionsArg.keepAlive: optionsArg.agent = httpsAgent; return plugins.https; - case parsedUrl.protocol === 'https:' && !optionsArg.keepAlive: + case parsedUrl.protocol === 'https:' && (!optionsArg.keepAlive): optionsArg.agent = httpsAgentKeepAliveFalse; return plugins.https; case parsedUrl.protocol === 'http:' && optionsArg.keepAlive: optionsArg.agent = httpAgent; return plugins.http; - case parsedUrl.protocol === 'http:' && !optionsArg.keepAlive: + case parsedUrl.protocol === 'http:' && (!optionsArg.keepAlive): optionsArg.agent = httpAgentKeepAliveFalse; return plugins.http; }