Skip to content

Commit

Permalink
fix Cannot access 'connection' before initialization (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
moty66 committed May 1, 2023
1 parent 1f78c82 commit fd8e8c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/customise-individual-connection.js
Expand Up @@ -7,6 +7,8 @@ const server = http.createServer(handle)

server.listen(0, startBench)

let connection = 0

function handle (req, res) {
res.end('hello world')
}
Expand All @@ -21,8 +23,6 @@ function startBench () {
setupClient
}, finishedBench)

let connection = 0

function setupClient (client) {
client.setBody('connection number', connection++)
}
Expand Down

0 comments on commit fd8e8c3

Please sign in to comment.