@@ -50,13 +50,11 @@ import {
5050import {
5151 _advanceClusterTime ,
5252 type ClusterTime ,
53- drainTimerQueue ,
5453 ServerType ,
5554 STATE_CLOSED ,
5655 STATE_CLOSING ,
5756 STATE_CONNECTED ,
5857 STATE_CONNECTING ,
59- type TimerQueue ,
6058 TopologyType
6159} from './common' ;
6260import {
@@ -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 ;
@@ -325,8 +321,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
325321 credentials : options ?. credentials ,
326322 clusterTime : undefined ,
327323
328- // timer management
329- connectionTimers : new Set < NodeJS . Timeout > ( ) ,
330324 detectShardedTopology : ev => this . detectShardedTopology ( ev ) ,
331325 detectSrvRecords : ev => this . detectSrvRecords ( ev )
332326 } ;
@@ -415,8 +409,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
415409 } finally {
416410 this . connectionLock = undefined ;
417411 }
418-
419- return this ;
420412 }
421413
422414 private async _connect ( options ?: ConnectOptions ) : Promise < Topology > {
@@ -515,7 +507,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
515507 stateTransition ( this , STATE_CLOSING ) ;
516508
517509 drainWaitQueue ( this [ kWaitQueue ] , new MongoTopologyClosedError ( ) ) ;
518- drainTimerQueue ( this . s . connectionTimers ) ;
519510
520511 if ( this . s . srvPoller ) {
521512 this . s . srvPoller . stop ( ) ;
0 commit comments