Skip to content

Commit 1a5ca45

Browse files
lower limit variable
1 parent 5c6733a commit 1a5ca45

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/consts.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export const DEFAULT_POLL_VALUE = 60;
2+
export const POLL_LOWER_LIMIT = 20;

lib/webpagetest.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var http = require("http"),
1515
server = require("./server"),
1616
mapping = require("./mapping");
1717

18-
const { DEFAULT_POLL_VALUE } = require("./consts");
18+
const { DEFAULT_POLL_VALUE, POLL_LOWER_LIMIT} = require("./consts");
1919

2020
var reSpace = /\s/,
2121
reConnectivity =
@@ -476,8 +476,7 @@ function runTest(what, options, callback) {
476476

477477
// poll results
478478
if (options.pollResults && !options.dryRun) {
479-
// setting the lower limit to 20s
480-
options.pollResults = Math.max(20, options.pollResults || DEFAULT_POLL_VALUE) * 1000;
479+
options.pollResults = Math.max(POLL_LOWER_LIMIT, options.pollResults || DEFAULT_POLL_VALUE) * 1000;
481480

482481
return api.call(
483482
this,

0 commit comments

Comments
 (0)