@@ -50,13 +50,11 @@ import {
50
50
import {
51
51
_advanceClusterTime ,
52
52
type ClusterTime ,
53
- drainTimerQueue ,
54
53
ServerType ,
55
54
STATE_CLOSED ,
56
55
STATE_CLOSING ,
57
56
STATE_CONNECTED ,
58
57
STATE_CONNECTING ,
59
- type TimerQueue ,
60
58
TopologyType
61
59
} from './common' ;
62
60
import {
@@ -132,8 +130,6 @@ export interface TopologyPrivate {
132
130
servers : Map < string , Server > ;
133
131
credentials ?: MongoCredentials ;
134
132
clusterTime ?: ClusterTime ;
135
- /** timers created for the initial connect to a server */
136
- connectionTimers : TimerQueue ;
137
133
138
134
/** related to srv polling */
139
135
srvPoller ?: SrvPoller ;
@@ -325,8 +321,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
325
321
credentials : options ?. credentials ,
326
322
clusterTime : undefined ,
327
323
328
- // timer management
329
- connectionTimers : new Set < NodeJS . Timeout > ( ) ,
330
324
detectShardedTopology : ev => this . detectShardedTopology ( ev ) ,
331
325
detectSrvRecords : ev => this . detectSrvRecords ( ev )
332
326
} ;
@@ -415,8 +409,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
415
409
} finally {
416
410
this . connectionLock = undefined ;
417
411
}
418
-
419
- return this ;
420
412
}
421
413
422
414
private async _connect ( options ?: ConnectOptions ) : Promise < Topology > {
@@ -515,7 +507,6 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
515
507
stateTransition ( this , STATE_CLOSING ) ;
516
508
517
509
drainWaitQueue ( this [ kWaitQueue ] , new MongoTopologyClosedError ( ) ) ;
518
- drainTimerQueue ( this . s . connectionTimers ) ;
519
510
520
511
if ( this . s . srvPoller ) {
521
512
this . s . srvPoller . stop ( ) ;
0 commit comments