Skip to content

Commit

Permalink
benchmark: fix variables not being set
Browse files Browse the repository at this point in the history
Due to the destructuring the outer variables were not set anymore.

PR-URL: #18320
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
BridgeAR authored and MylesBorins committed Feb 21, 2018
1 parent 4a5d7d4 commit 7da01f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions benchmark/tls/tls-connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ const bench = common.createBenchmark(main, {

var clientConn = 0;
var serverConn = 0;
var server;
var dur;
var concurrency;
var running = true;

function main({ dur, concurrency }) {
function main(conf) {
dur = conf.dur;
concurrency = conf.concurrency;
const cert_dir = path.resolve(__dirname, '../../test/fixtures');
const options = {
key: fs.readFileSync(`${cert_dir}/test_key.pem`),
Expand All @@ -25,7 +26,7 @@ function main({ dur, concurrency }) {
ciphers: 'AES256-GCM-SHA384'
};

server = tls.createServer(options, onConnection);
const server = tls.createServer(options, onConnection);
server.listen(common.PORT, onListening);
}

Expand Down

0 comments on commit 7da01f4

Please sign in to comment.