[Telemetry] Remove initial delay to check and send (#26575) (#26601)

* [Telemetry] Remove initial delay to check and send

* do not fire immediately
This commit is contained in:
Tim Sullivan 2018-12-03 21:11:22 -07:00 committed by GitHub
parent 8e573a2f7b
commit 4f017265e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,17 +92,7 @@ export class Telemetry {
* Public method
*/
start() {
// delay the initial report to allow the user some time to read the opt-out message
let hasWaited = false;
// continuously check if it's due time for a report
window.setInterval(() => {
if (hasWaited) {
// throw away the return data
this._sendIfDue();
}
hasWaited = true;
}, 60000);
window.setInterval(() => this._sendIfDue(), 60000);
}
} // end class