1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/patches/http-proxy+1.17.0.patch
Lauri Nevala ff042d8c1f Do not timeout watch requests
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
2020-04-18 23:12:09 +03:00

23 lines
886 B
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff --git a/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js b/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
index 995a0db..a5c37f5 100644
--- a/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
+++ b/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js
@@ -50,7 +50,7 @@ module.exports = {
*/
timeout: function timeout(req, res, options) {
- if(options.timeout) {
+ if(options.timeout || options.timeout === 0) {
req.socket.setTimeout(options.timeout);
}
},
@@ -134,7 +134,7 @@ module.exports = {
// allow outgoing socket to timeout so that we could
// show an error page at the initial request
- if(options.proxyTimeout) {
+ if(options.proxyTimeout || options.proxyTimeout === 0) {
proxyReq.setTimeout(options.proxyTimeout, function() {
proxyReq.abort();
});