Skip to content

Commit

Permalink
Fixed mcollina#482
Browse files Browse the repository at this point in the history
  • Loading branch information
LaukikOnWindows committed Mar 12, 2023
1 parent b198514 commit 3630dbf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/run.js
Expand Up @@ -152,9 +152,11 @@ function run (opts, tracker, cb) {

const restartFn = () => {
stop = false
stopTimer = setTimeout(() => {
stop = true
}, opts.duration * 1000)
if (!amount) {
stopTimer = setTimeout(() => {
stop = true
}, opts.duration * 1000)
}
errors = 0
timeouts = 0
mismatches = 0
Expand All @@ -167,6 +169,7 @@ function run (opts, tracker, cb) {
latencies.reset()
throughput.reset()
startTime = Date.now()
numRunning = opts.connections

// reinitialise clients
if (opts.overallRate && (opts.overallRate < opts.connections)) opts.connections = opts.overallRate
Expand Down

0 comments on commit 3630dbf

Please sign in to comment.