@@ -1521,9 +1521,6 @@ const connectWithOptions = (
15211521 inflightConnection = ( async ( ) => {
15221522 const deviceAuthAbortController = new AbortController ( ) ;
15231523
1524- let cancelled = false ;
1525- let started = false ;
1526- let succeeded = false ;
15271524 try {
15281525 if (
15291526 getCurrentConnectionStatus ( getState ( ) , connectionInfo . id ) ===
@@ -1638,7 +1635,6 @@ const connectWithOptions = (
16381635 ) ;
16391636 }
16401637
1641- started = true ;
16421638 // This is used for Data Explorer connection latency tracing
16431639 log . info (
16441640 mongoLogId ( 1_001_000_005 ) ,
@@ -1670,7 +1666,6 @@ const connectWithOptions = (
16701666 // This is how connection attempt indicates that the connection was
16711667 // aborted
16721668 if ( ! dataService || connectionAttempt . isClosed ( ) ) {
1673- cancelled = true ;
16741669 // This is used for Data Explorer connection latency tracing
16751670 log . info (
16761671 mongoLogId ( 1_001_000_007 ) ,
@@ -1847,7 +1842,6 @@ const connectWithOptions = (
18471842 connectionInfo
18481843 ) ;
18491844
1850- succeeded = true ;
18511845 // This is used for Data Explorer connection latency tracing
18521846 log . info (
18531847 mongoLogId ( 1_001_000_006 ) ,
@@ -1894,18 +1888,16 @@ const connectWithOptions = (
18941888 ) ;
18951889 }
18961890 } catch ( err ) {
1897- if ( started && ! succeeded && ! cancelled ) {
1898- log . info (
1899- mongoLogId ( 1_001_000_008 ) ,
1900- 'Compass Connection Attempt Failed' ,
1901- 'Connection attempt failed' ,
1902- {
1903- clusterName : connectionInfo . atlasMetadata ?. clusterName ,
1904- connectionId : connectionInfo . id ,
1905- error : ( err as Error ) . message ,
1906- }
1907- ) ;
1908- }
1891+ log . info (
1892+ mongoLogId ( 1_001_000_008 ) ,
1893+ 'Compass Connection Attempt Failed' ,
1894+ 'Connection attempt failed' ,
1895+ {
1896+ clusterName : connectionInfo . atlasMetadata ?. clusterName ,
1897+ connectionId : connectionInfo . id ,
1898+ error : ( err as Error ) . message ,
1899+ }
1900+ ) ;
19091901 dispatch ( connectionAttemptError ( connectionInfo , err ) ) ;
19101902 } finally {
19111903 deviceAuthAbortController . abort ( ) ;
0 commit comments