Skip to content

Commit

Permalink
quic: remove undefined variable
Browse files Browse the repository at this point in the history
The `reason` variable never gets defined. It's use in a template string
will always end up as the string `'undefined'`.

PR-URL: nodejs#35007
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
Trott authored and joesepi committed Oct 22, 2020
1 parent 08d8579 commit 64c12b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/internal/quic/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,6 @@ class QuicClientSession extends QuicSession {

// If handle is a number, creating the session failed.
if (typeof handle === 'number') {
let reason;
switch (handle) {
case ERR_FAILED_TO_CREATE_SESSION:
throw new ERR_QUIC_FAILED_TO_CREATE_SESSION();
Expand All @@ -2398,7 +2397,7 @@ class QuicClientSession extends QuicSession {
case ERR_INVALID_TLS_SESSION_TICKET:
throw new ERR_QUIC_INVALID_TLS_SESSION_TICKET();
default:
throw new ERR_OPERATION_FAILED(`Unspecified reason [${reason}]`);
throw new ERR_OPERATION_FAILED(`Unspecified reason [${handle}]`);
}
}

Expand Down

0 comments on commit 64c12b1

Please sign in to comment.