From 4461628e1b959642e2aa051b28dab9f7cfceb6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=9A=E7=84=B6?= Date: Tue, 6 Sep 2016 10:23:09 +0800 Subject: [PATCH] fix the issue with TLS connection cache, when server doesn't recognize the cache, it will hang up the following request after the cached one. refer to https://github.com/nodejs/node/issues/8368 --- lib/requestHandler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/requestHandler.js b/lib/requestHandler.js index f0f9a7e..04b0cda 100644 --- a/lib/requestHandler.js +++ b/lib/requestHandler.js @@ -16,6 +16,9 @@ var http = require("http"), var userRule = util.freshRequire('./rule_default'); +// to fix issue with TLS cache, refer to: https://github.com/nodejs/node/issues/8368 +https.globalAgent.maxCachedSessions = 0; + function userRequestHandler(req,userRes){ /* note