Skip to content

Commit 1e9c100

Browse files
committed
COMPASS-9793: fetch connection info after adding non-retryable error listener
1 parent 5777542 commit 1e9c100

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

packages/compass-connections/src/stores/connections-store-redux.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,14 +1703,6 @@ const connectWithOptions = (
17031703
return;
17041704
}
17051705

1706-
// We're trying to optimise the initial Compass loading times here: to
1707-
// make sure that the driver connection pool doesn't immediately get
1708-
// overwhelmed with requests, we fetch instance info only once and then
1709-
// pass it down to telemetry and instance model. This is a relatively
1710-
// expensive dataService operation so we're trying to keep the usage
1711-
// very limited
1712-
const instanceInfo = await dataService.instance();
1713-
17141706
let showedNonRetryableErrorToast = false;
17151707
// Listen for non-retry-able errors on failed server heartbeats.
17161708
// These can happen on compass web when:
@@ -1738,6 +1730,14 @@ const connectWithOptions = (
17381730
void dataService.disconnect();
17391731
}
17401732
);
1733+
1734+
// We're trying to optimise the initial Compass loading times here: to
1735+
// make sure that the driver connection pool doesn't immediately get
1736+
// overwhelmed with requests, we fetch instance info only once and then
1737+
// pass it down to telemetry and instance model. This is a relatively
1738+
// expensive dataService operation so we're trying to keep the usage
1739+
// very limited
1740+
const instanceInfo = await dataService.instance();
17411741

17421742
dataService.on('oidcAuthFailed', (error) => {
17431743
openToast('oidc-auth-failed', {

0 commit comments

Comments
 (0)