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 Fishrock123 committed Mar 22, 2016
1 parent 3ada8cc commit 1ccf9b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/net.js
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 1ccf9b4

Please sign in to comment.