Skip to content

Commit

Permalink
inspector: removing checking of non existent field in lib/inspector.js
Browse files Browse the repository at this point in the history
Seems like sessionAttached doesn't exist and no more assigned anywhere

PR-URL: nodejs#27919
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Keroosha authored and ryzokuken committed May 29, 2019
1 parent ff66e08 commit c91a90b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c91a90b

Please sign in to comment.