Skip to content

Commit

Permalink
net: remove unused var self = this from old code
Browse files Browse the repository at this point in the history
Removed an unused `var self = this` that is no longer required.

PR-URL: #5224
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
  • Loading branch information
benjamingr committed Mar 20, 2016
1 parent 4f6ad5c commit 5dc0e74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ function writeAfterFIN(chunk, encoding, cb) {

var er = new Error('This socket has been ended by the other party');
er.code = 'EPIPE';
var self = this;
// TODO: defer error events consistently everywhere, not just the cb
self.emit('error', er);
this.emit('error', er);
if (typeof cb === 'function') {
process.nextTick(cb, er);
}
Expand Down

0 comments on commit 5dc0e74

Please sign in to comment.