http2-proxy
Advanced tools
Comparing version 0.2.9 to 0.2.10
10
index.js
@@ -48,3 +48,11 @@ const http2 = require('http2') | ||
}, onProxyError) { | ||
let hasError = false | ||
function onError (err, statusCode = (err && err.statusCode) || 500) { | ||
if (hasError) { | ||
return | ||
} | ||
hasError = true | ||
if (resOrSocket.closed === true || | ||
@@ -98,3 +106,3 @@ resOrSocket.headersSent !== false || | ||
if (timeout) { | ||
req.setTimeout(timeout, () => onError(new createError.RequestTimeout())) | ||
req.setTimeout(timeout, () => onError(createError('request timeout', null, 408))) | ||
} | ||
@@ -101,0 +109,0 @@ |
{ | ||
"name": "http2-proxy", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "dev": "nodemon --inspect=9308 --expose-http2 src", |
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
15591
285