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 <benjamingr@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
benjamingr authored and Myles Borins committed Mar 30, 2016
1 parent f209eff commit 07b7172
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 07b7172

Please sign in to comment.