tcp-proxy.js
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -76,2 +76,3 @@ 'use strict'; | ||
_server.pipe(client); | ||
this.emit('connection', _client, _server); | ||
}); | ||
@@ -90,3 +91,2 @@ | ||
client.once('error', onClose); | ||
this.emit('connection'); | ||
}) | ||
@@ -108,2 +108,6 @@ .listen(proxyPort); | ||
end() { | ||
if (!this.server) { | ||
return Promise.resolve(); | ||
} | ||
return new Promise(resolve => { | ||
@@ -110,0 +114,0 @@ this.server.close(resolve); |
{ | ||
"name": "tcp-proxy.js", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "simple tcp proxy", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
6190
97