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,
|
timedOut: true,
|
||||||
});
|
});
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
let reported = false;
|
||||||
const reportBrowserConnection = (successful: boolean) => {
|
const reportBrowserConnection = (successful: boolean) => {
|
||||||
|
if (reported) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
clearTimeout(browserConnectionTimeout);
|
clearTimeout(browserConnectionTimeout);
|
||||||
|
reported = true;
|
||||||
tracker.track('browser-connection-created', {
|
tracker.track('browser-connection-created', {
|
||||||
successful,
|
successful,
|
||||||
timeMS: performance.now() - t0,
|
timeMS: performance.now() - t0,
|
||||||
|
|||||||
Reference in New Issue
Block a user