From 0273115037e9fcb16e007179c516f48ae2d2e6c9 Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Sun, 14 Feb 2016 17:27:17 +0200 Subject: [PATCH] net: remove unused `var self = this` from old code Removed an unused `var self = this` that is no longer required. PR-URL: https://github.com/nodejs/node/pull/5224 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Evan Lucas Reviewed-By: Sakthipriyan Vairamani --- lib/net.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/net.js b/lib/net.js index 1a131e53315fd5..40d8f27f76db6a 100644 --- a/lib/net.js +++ b/lib/net.js @@ -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); }