Compare commits

...

2 Commits

Author SHA1 Message Date
ef7e54be34 2.0.3 2021-02-02 00:53:58 +00:00
d800b6ed6e fix(core): update 2021-02-02 00:53:57 +00:00
3 changed files with 9 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartproxy", "name": "@pushrocks/smartproxy",
"version": "2.0.2", "version": "2.0.3",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartproxy", "name": "@pushrocks/smartproxy",
"version": "2.0.2", "version": "2.0.3",
"private": false, "private": false,
"description": "a proxy for handling high workloads of proxying", "description": "a proxy for handling high workloads of proxying",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -24,8 +24,13 @@ const portProxyCalls = {
host: 'localhost', host: 'localhost',
port: 8001 port: 8001
}); });
from.pipe(to); from.pipe(to)
to.pipe(from); to.pipe(from)
from.on('error', () => { from.end(), to.end() });
to.on('error', () => { from.end(), to.end() });
from.on('close', () => {
to.end();
})
}) })
.listen(portArg); .listen(portArg);
console.log(`PortProxy -> OK: Now listening on port ${portArg}`); console.log(`PortProxy -> OK: Now listening on port ${portArg}`);