fix(core): update

This commit is contained in:
Philipp Kunz 2021-02-02 00:53:57 +00:00
parent af42598464
commit d800b6ed6e

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}`);