Skip to content

Commit 4a3a5ed

Browse files
committed
COMPASS-9793: fetch connection info after all listeners
1 parent 1e9c100 commit 4a3a5ed

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
@@ -1730,14 +1730,6 @@ const connectWithOptions = (
17301730
void dataService.disconnect();
17311731
}
17321732
);
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();
17411733

17421734
dataService.on('oidcAuthFailed', (error) => {
17431735
openToast('oidc-auth-failed', {
@@ -1781,6 +1773,14 @@ const connectWithOptions = (
17811773

17821774
DataServiceForConnection.set(connectionInfo.id, dataService);
17831775

1776+
// We're trying to optimise the initial Compass loading times here: to
1777+
// make sure that the driver connection pool doesn't immediately get
1778+
// overwhelmed with requests, we fetch instance info only once and then
1779+
// pass it down to telemetry and instance model. This is a relatively
1780+
// expensive dataService operation so we're trying to keep the usage
1781+
// very limited
1782+
const instanceInfo = await dataService.instance();
1783+
17841784
try {
17851785
await dispatch(
17861786
saveConnectionInfo(

0 commit comments

Comments
 (0)