Skip to content

Commit 7da01f4

Browse files
BridgeARMylesBorins
authored andcommitted
benchmark: fix variables not being set
Due to the destructuring the outer variables were not set anymore. PR-URL: #18320 Reviewed-By: James M Snell <[email protected]>
1 parent 4a5d7d4 commit 7da01f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

benchmark/tls/tls-connect.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ const bench = common.createBenchmark(main, {
1111

1212
var clientConn = 0;
1313
var serverConn = 0;
14-
var server;
1514
var dur;
1615
var concurrency;
1716
var running = true;
1817

19-
function main({ dur, concurrency }) {
18+
function main(conf) {
19+
dur = conf.dur;
20+
concurrency = conf.concurrency;
2021
const cert_dir = path.resolve(__dirname, '../../test/fixtures');
2122
const options = {
2223
key: fs.readFileSync(`${cert_dir}/test_key.pem`),
@@ -25,7 +26,7 @@ function main({ dur, concurrency }) {
2526
ciphers: 'AES256-GCM-SHA384'
2627
};
2728

28-
server = tls.createServer(options, onConnection);
29+
const server = tls.createServer(options, onConnection);
2930
server.listen(common.PORT, onListening);
3031
}
3132

0 commit comments

Comments
 (0)