conn.resume() to fix close-or-hangup bug

This commit is contained in:
AJ ONeal 2018-05-26 08:52:38 +00:00
parent d3a6ef96d6
commit 539fb4e62a
2 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,7 @@ module.exports.create = function (state) {
// Probably something that needs to be redirected to https // Probably something that needs to be redirected to https
function redirectHttpsAndClose(req, res) { function redirectHttpsAndClose(req, res) {
res.setHeader('Connection', 'close'); //res.setHeader('Connection', 'close');
redirectHttps(req, res); redirectHttps(req, res);
} }
state.httpInsecureServer = http.createServer( state.httpInsecureServer = http.createServer(

View File

@ -72,6 +72,7 @@ module.exports.createTcpConnectionHandler = function (copts) {
// defer after return (instead of being in many places) // defer after return (instead of being in many places)
process.nextTick(function () { process.nextTick(function () {
conn.unshift(firstChunk); conn.unshift(firstChunk);
conn.resume();
}); });
var service = 'tcp'; var service = 'tcp';