Skip to content

Commit 07b7172

Browse files
benjamingrMyles Borins
authored and
Myles Borins
committed
net: remove unused var self = this from old code
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]>
1 parent f209eff commit 07b7172

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/net.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ function writeAfterFIN(chunk, encoding, cb) {
277277

278278
var er = new Error('This socket has been ended by the other party');
279279
er.code = 'EPIPE';
280-
var self = this;
281280
// TODO: defer error events consistently everywhere, not just the cb
282-
self.emit('error', er);
281+
this.emit('error', er);
283282
if (typeof cb === 'function') {
284283
process.nextTick(cb, er);
285284
}

0 commit comments

Comments
 (0)