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‎

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

1212
varclientConn=0;
1313
varserverConn=0;
14-
varserver;
1514
vardur;
1615
varconcurrency;
1716
varrunning=true;
1817

19-
functionmain({ dur, concurrency }){
18+
functionmain(conf){
19+
dur=conf.dur;
20+
concurrency=conf.concurrency;
2021
constcert_dir=path.resolve(__dirname,'../../test/fixtures');
2122
constoptions={
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+
constserver=tls.createServer(options,onConnection);
2930
server.listen(common.PORT,onListening);
3031
}
3132

0 commit comments

Comments
(0)