http2-wrapper
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "http2-wrapper", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "HTTP2 client, just with the familiar `https` API", | ||
@@ -35,3 +35,3 @@ "main": "source", | ||
"quick-lru": "^5.1.1", | ||
"resolve-alpn": "^1.0.1" | ||
"resolve-alpn": "^1.1.1" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
@@ -136,4 +136,16 @@ 'use strict'; | ||
let {socket, alpnProtocol} = await resolveProtocol(options); | ||
let {socket, alpnProtocol, timeout} = await resolveProtocol(options); | ||
if (timeout) { | ||
if (socket) { | ||
socket.destroy(); | ||
} | ||
const error = new Error(`Timed out resolving ALPN: ${options.timeout} ms`); | ||
error.code = 'ETIMEDOUT'; | ||
error.ms = options.timeout; | ||
throw error; | ||
} | ||
// We can't accept custom `createConnection` because the API is different for HTTP/2 | ||
@@ -140,0 +152,0 @@ if (socket && options.createConnection) { |
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
69301
1811
Updatedresolve-alpn@^1.1.1