parent
c152c0a814
commit
12f96a579a
@ -36,7 +36,7 @@ class APIRequest {
|
|||||||
if (agent === null) {
|
if (agent === null) {
|
||||||
if (typeof this.client.options.proxy === 'string' && this.client.options.proxy.length > 0) {
|
if (typeof this.client.options.proxy === 'string' && this.client.options.proxy.length > 0) {
|
||||||
const proxy = require('proxy-agent');
|
const proxy = require('proxy-agent');
|
||||||
agent = new proxy(this.client.options.proxy);
|
agent = new proxy.ProxyAgent(this.client.options.proxy);
|
||||||
} else if (this.client.options.http.agent instanceof https.Agent) {
|
} else if (this.client.options.http.agent instanceof https.Agent) {
|
||||||
agent = this.client.options.http.agent;
|
agent = this.client.options.http.agent;
|
||||||
agent.keepAlive = true;
|
agent.keepAlive = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user