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

* [Telemetry] Remove initial delay to check and send

* do not fire immediately
This commit is contained in:
Tim Sullivan 2018-12-03 18:26:42 -07:00 committed by GitHub
parent d8a70b5c26
commit ee3fc58c62
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