@@ -49,13 +49,11 @@ import {
4949import {
5050 _advanceClusterTime ,
5151 type ClusterTime ,
52- drainTimerQueue ,
5352 ServerType ,
5453 STATE_CLOSED ,
5554 STATE_CLOSING ,
5655 STATE_CONNECTED ,
5756 STATE_CONNECTING ,
58- type TimerQueue ,
5957 TopologyType
6058} from './common' ;
6159import {
@@ -132,8 +130,6 @@ export interface TopologyPrivate {
132130 servers : Map < string , Server > ;
133131 credentials ?: MongoCredentials ;
134132 clusterTime ?: ClusterTime ;
135- /** timers created for the initial connect to a server */
136- connectionTimers : TimerQueue ;
137133
138134 /** related to srv polling */
139135 srvPoller ?: SrvPoller ;
@@ -322,8 +318,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
322318 credentials : options ?. credentials ,
323319 clusterTime : undefined ,
324320
325- // timer management
326- connectionTimers : new Set < NodeJS . Timeout > ( ) ,
327321 detectShardedTopology : ev => this . detectShardedTopology ( ev ) ,
328322 detectSrvRecords : ev => this . detectSrvRecords ( ev )
329323 } ;
@@ -412,8 +406,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
412406 } finally {
413407 this . connectionLock = undefined ;
414408 }
415-
416- return this ;
417409 }
418410
419411 private async _connect ( options ?: ConnectOptions ) : Promise < Topology > {
@@ -501,7 +493,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
501493 stateTransition ( this , STATE_CLOSING ) ;
502494
503495 drainWaitQueue ( this [ kWaitQueue ] , new MongoTopologyClosedError ( ) ) ;
504- drainTimerQueue ( this . s . connectionTimers ) ;
505496
506497 if ( this . s . srvPoller ) {
507498 this . s . srvPoller . stop ( ) ;
0 commit comments