Skip to content

Commit

Permalink
fix: fix debug output error
Browse files Browse the repository at this point in the history
  • Loading branch information
whxaxes committed Sep 21, 2017
1 parent e222327 commit 1348d15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ module.exports = class TCPProxy extends EventEmitter {

createProxy({ port, forwardPort, forwardHost, interceptor }) {
const proxyPort = port || this.port;
forwardHost = forwardHost || '127.0.0.1';
interceptor = interceptor || {};

if (this.server) {
Expand Down Expand Up @@ -76,7 +77,7 @@ module.exports = class TCPProxy extends EventEmitter {

_client.pipe(server);
_server.pipe(client);
debug(`proxy 127.0.0.1:${port} connect to ${forwardHost}:${forwardPort}`);
debug(`proxy 127.0.0.1:${proxyPort} connect to ${forwardHost}:${forwardPort}`);
this.emit('connection', _client, _server);
});

Expand Down

0 comments on commit 1348d15

Please sign in to comment.