Prevent duplicate browser connection reporting
Reviewed By: lblasa Differential Revision: D51347107 fbshipit-source-id: 14f4507835794d76b17f9a6891f22dbc0cc1a8f7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ed7a7f7bd0
commit
f01568bf59
@@ -105,8 +105,13 @@ const browserConnectionTimeout = setTimeout(() => {
|
||||
timedOut: true,
|
||||
});
|
||||
}, 10000);
|
||||
let reported = false;
|
||||
const reportBrowserConnection = (successful: boolean) => {
|
||||
if (reported) {
|
||||
return;
|
||||
}
|
||||
clearTimeout(browserConnectionTimeout);
|
||||
reported = true;
|
||||
tracker.track('browser-connection-created', {
|
||||
successful,
|
||||
timeMS: performance.now() - t0,
|
||||
|
||||
Reference in New Issue
Block a user