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

Этот коммит содержится в:
AJ ONeal 2018-05-26 08:52:38 +00:00
родитель d3a6ef96d6
Коммит 539fb4e62a
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

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

Просмотреть файл

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