Comparing version 5.0.3-beta2 to 5.0.3-beta3
@@ -88,2 +88,6 @@ 'use strict' | ||
this.connectOptions = { | ||
family: 4 | ||
} | ||
for (let k in options) { | ||
@@ -106,2 +110,8 @@ switch (k) { | ||
break | ||
case 'connectOptions': | ||
if (options[k] && typeof options[k] === 'object') { | ||
for (let a in options[k]) this.connectOptions[a] = options[k][a] | ||
} | ||
break | ||
} | ||
@@ -228,13 +238,20 @@ } | ||
h2Pool: null, | ||
timeout: this.timeout | ||
timeout: this.timeout, | ||
connectOptions: {...this.connectOptions} | ||
} | ||
if (tmp.connectOptions && typeof tmp.connectOptions === 'object') { | ||
for (let o in tmp.connectOptions) { | ||
backend_obj.connectOptions[o] = tmp.connectOptions[o] | ||
} | ||
} | ||
backend_obj.keepalive = true | ||
backend_obj.connectOptions.max = backend_obj.max | ||
backend_obj.connectOptions.reconnDelay = backend_obj.reconnDelay | ||
backend_obj.connectOptions.debug = backend_obj.debug | ||
this.checkAndSetConfig(backend_obj, tmp) | ||
backend_obj.h2Pool = h2cli.connectPool(backend_obj.url, { | ||
keepalive: true, | ||
max: backend_obj.max, | ||
reconnDelay: backend_obj.reconnDelay, | ||
debug: backend_obj.debug | ||
}) | ||
backend_obj.h2Pool = h2cli.connectPool(backend_obj.url, backend_obj.connectOptions) | ||
@@ -241,0 +258,0 @@ if (this.hostProxy[k][pt] === undefined) { |
{ | ||
"name": "gohttp", | ||
"version": "5.0.3-beta2", | ||
"version": "5.0.3-beta3", | ||
"description": "http & https client for HTTP/1.1 and HTTP/2", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109963
2058