Skip to content

Commit fd7870e

Browse files
remove dead code
1 parent fd7acde commit fd7870e

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

src/cmap/connection_pool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export class ConnectionPool extends TypedEventEmitter<ConnectionPoolEvents> {
402402
}
403403
throw error;
404404
} finally {
405-
if (options.timeoutContext.clearConnectionCheckoutTimeout) timeout?.clear();
405+
timeout?.clear();
406406
}
407407
}
408408

src/cursor/abstract_cursor.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,9 +1169,6 @@ export class CursorTimeoutContext extends TimeoutContext {
11691169
override get clearServerSelectionTimeout(): boolean {
11701170
return this.timeoutContext.clearServerSelectionTimeout;
11711171
}
1172-
override get clearConnectionCheckoutTimeout(): boolean {
1173-
return this.timeoutContext.clearConnectionCheckoutTimeout;
1174-
}
11751172
override get timeoutForSocketWrite(): Timeout | null {
11761173
return this.timeoutContext.timeoutForSocketWrite;
11771174
}

src/timeout.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ export abstract class TimeoutContext {
171171

172172
abstract get clearServerSelectionTimeout(): boolean;
173173

174-
abstract get clearConnectionCheckoutTimeout(): boolean;
175-
176174
abstract get timeoutForSocketWrite(): Timeout | null;
177175

178176
abstract get timeoutForSocketRead(): Timeout | null;
@@ -193,7 +191,6 @@ export class CSOTTimeoutContext extends TimeoutContext {
193191
serverSelectionTimeoutMS: number;
194192
socketTimeoutMS?: number;
195193

196-
clearConnectionCheckoutTimeout: boolean;
197194
clearServerSelectionTimeout: boolean;
198195

199196
private _serverSelectionTimeout?: Timeout | null;
@@ -212,7 +209,6 @@ export class CSOTTimeoutContext extends TimeoutContext {
212209
this.socketTimeoutMS = options.socketTimeoutMS;
213210

214211
this.clearServerSelectionTimeout = false;
215-
this.clearConnectionCheckoutTimeout = true;
216212
}
217213

218214
get maxTimeMS(): number {
@@ -331,13 +327,11 @@ export class CSOTTimeoutContext extends TimeoutContext {
331327
export class LegacyTimeoutContext extends TimeoutContext {
332328
options: LegacyTimeoutContextOptions;
333329
clearServerSelectionTimeout: boolean;
334-
clearConnectionCheckoutTimeout: boolean;
335330

336331
constructor(options: LegacyTimeoutContextOptions) {
337332
super();
338333
this.options = options;
339334
this.clearServerSelectionTimeout = true;
340-
this.clearConnectionCheckoutTimeout = true;
341335
}
342336

343337
csotEnabled(): this is CSOTTimeoutContext {

0 commit comments

Comments
 (0)