diff --git a/lib/net/socks.js b/lib/net/socks.js index 6f789f95..3cb9129a 100644 --- a/lib/net/socks.js +++ b/lib/net/socks.js @@ -212,7 +212,7 @@ SOCKS.prototype.handleClose = function handleClose() { var state; if (this.state !== this.target) { - state = SOCKS.statesByVal[this.target]; + state = SOCKS.statesByVal[this.state]; this.error('SOCKS request destroyed (state=%s).', state); return; }