diff --git a/lib/events.js b/lib/events.js index 5dfa34469b09af..3fce38f881b9fb 100644 --- a/lib/events.js +++ b/lib/events.js @@ -224,7 +224,7 @@ function _addListener(target, type, listener, prepend) { if (existing === undefined) { // Optimize the case of one listener. Don't need the extra array object. - existing = events[type] = listener; + events[type] = listener; ++target._eventsCount; } else { if (typeof existing === 'function') { diff --git a/lib/internal/readline.js b/lib/internal/readline.js index c325f42cf42328..f1716f1f25824f 100644 --- a/lib/internal/readline.js +++ b/lib/internal/readline.js @@ -258,7 +258,7 @@ function* emitKeys(stream) { s += (ch = yield); if (ch >= '0' && ch <= '9') { - s += (ch = yield); + s += yield; } } diff --git a/lib/net.js b/lib/net.js index a46844adf3e9a0..821647c81fd0a0 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1055,10 +1055,6 @@ function afterConnect(status, handle, req, readable, writable) { return; } - // Update handle if it was wrapped - // TODO(indutny): assert that the handle is actually an ancestor of old one - handle = self._handle; - debug('afterConnect'); assert(self.connecting);