Skip to content

Commit 11b09f9

Browse files
Merge branch 'dev' into dist
2 parents 830cca4 + 7c0a79d commit 11b09f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/monitors/monitorROAS.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ export default class MonitorROAS extends Monitor {
6060

6161
_enablePeriodicCheck = (condition, checkFunction, seconds) => {
6262
if (condition) {
63-
setInterval(() => {
64-
this._skipIfStaleVrps(checkFunction);
65-
}, global.EXTERNAL_ROA_EXPIRATION_TEST || seconds * 1000);
63+
if (!global.EXTERNAL_ROA_EXPIRATION_TEST) {
64+
setTimeout(() => this._skipIfStaleVrps(checkFunction), 30 * 1000); // Initial run
65+
}
66+
setInterval(() => this._skipIfStaleVrps(checkFunction), global.EXTERNAL_ROA_EXPIRATION_TEST || seconds * 1000); // Periodic run
6667
}
6768
}
6869

0 commit comments

Comments
 (0)