fixed a few problems with our connections

This commit is contained in:
tigerbot 2017-05-29 12:50:29 -06:00
parent be6900cd50
commit d9486b8297
3 changed files with 3 additions and 2 deletions

View File

@ -34,6 +34,7 @@ module.exports.sendBadGateway = sendBadGateway;
module.exports.create = function (deps, config) { module.exports.create = function (deps, config) {
return function proxy(conn, newConnOpts, firstChunk, decrypt) { return function proxy(conn, newConnOpts, firstChunk, decrypt) {
var connected = false; var connected = false;
newConnOpts.allowHalfOpen = true;
var newConn = deps.net.createConnection(newConnOpts, function () { var newConn = deps.net.createConnection(newConnOpts, function () {
connected = true; connected = true;

View File

@ -29,7 +29,7 @@ module.exports.addTcpListener = function (port, handler) {
var enableDestroy = require('server-destroy'); var enableDestroy = require('server-destroy');
var net = require('net'); var net = require('net');
var resolved; var resolved;
var server = net.createServer(); var server = net.createServer({allowHalfOpen: true});
stat = serversMap[port] = { stat = serversMap[port] = {
server: server server: server

View File

@ -62,7 +62,7 @@
"serve-static": "^1.10.0", "serve-static": "^1.10.0",
"server-destroy": "^1.0.1", "server-destroy": "^1.0.1",
"sni": "^1.0.0", "sni": "^1.0.0",
"socket-pair": "^1.0.0", "socket-pair": "^1.0.1",
"stream-pair": "^1.0.3", "stream-pair": "^1.0.3",
"stunnel": "git+https://git.daplie.com/Daplie/node-tunnel-client.git#v1", "stunnel": "git+https://git.daplie.com/Daplie/node-tunnel-client.git#v1",
"tunnel-packer": "^1.3.0" "tunnel-packer": "^1.3.0"