| 988 | this.abortListener?.[kDispose](); |
| 989 | this.isClosed = true; |
| 990 | const timeoutContextForKillCursors = (): CursorTimeoutContext | undefined => { |
| 991 | if (timeoutMS != null) { |
| 992 | this.timeoutContext?.clear(); |
| 993 | return new CursorTimeoutContext( |
| 994 | TimeoutContext.create({ |
| 995 | serverSelectionTimeoutMS: this.client.s.options.serverSelectionTimeoutMS, |
| 996 | timeoutMS |
| 997 | }), |
| 998 | this |
| 999 | ); |
| 1000 | } else { |
| 1001 | return this.timeoutContext?.refreshed(); |
| 1002 | } |
| 1003 | }; |
| 1004 | |
| 1005 | const withEmitClose = async (fn: () => Promise<void>) => { |
| 1006 | try { |