From 1ccf9b4a56101317211aae2d60372daa2742de94 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 d0648e5d0d5b35..0d6a79f2714528 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); }