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: nodejs#18320
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR authored and MayaLekova committed May 8, 2018
1 parent e673f94 commit 13d28f5
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 13d28f5

Please sign in to comment.