From 512ab1fddfd596d11ff175a1b551d341ff7fed32 Mon Sep 17 00:00:00 2001 From: Keroosha Date: Sun, 26 May 2019 21:30:10 +0300 Subject: [PATCH] inspector: removing checking of non existent field in lib/inspector.js Seems like sessionAttached doesn't exist and no more assigned anywhere PR-URL: https://github.com/nodejs/node/pull/27919 Reviewed-By: Anna Henningsen Reviewed-By: Eugene Ostroukhov Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Ruben Bridgewater --- lib/inspector.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/inspector.js b/lib/inspector.js index 33c48125bbd22e..4bec628b7d789e 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -37,12 +37,8 @@ class Session extends EventEmitter { connect() { if (this[connectionSymbol]) throw new ERR_INSPECTOR_ALREADY_CONNECTED('The inspector session'); - const connection = + this[connectionSymbol] = new Connection((message) => this[onMessageSymbol](message)); - if (connection.sessionAttached) { - throw new ERR_INSPECTOR_ALREADY_CONNECTED('Another inspector session'); - } - this[connectionSymbol] = connection; } [onMessageSymbol](message) {