File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { clearTimeout , setTimeout } from 'timers' ;
2
2
3
- import { MongoOperationTimeoutError , MongoRuntimeError } from './error' ;
3
+ import { MongoRuntimeError } from './error' ;
4
4
import { noop } from './utils' ;
5
5
6
6
/** @internal */
@@ -260,15 +260,13 @@ export class CSOTTimeoutContext extends TimeoutContext {
260
260
get timeoutForSocketWrite ( ) : Timeout | null {
261
261
const { remainingTimeMS } = this ;
262
262
if ( ! Number . isFinite ( remainingTimeMS ) ) return null ;
263
- if ( remainingTimeMS > 0 ) return Timeout . expires ( remainingTimeMS ) ;
264
- throw new MongoOperationTimeoutError ( 'Timed out before socket write' ) ;
263
+ return Timeout . expires ( remainingTimeMS ) ;
265
264
}
266
265
267
266
get timeoutForSocketRead ( ) : Timeout | null {
268
267
const { remainingTimeMS } = this ;
269
268
if ( ! Number . isFinite ( remainingTimeMS ) ) return null ;
270
- if ( remainingTimeMS > 0 ) return Timeout . expires ( remainingTimeMS ) ;
271
- throw new MongoOperationTimeoutError ( 'Timed out before socket read' ) ;
269
+ return Timeout . expires ( remainingTimeMS ) ;
272
270
}
273
271
}
274
272
You can’t perform that action at this time.
0 commit comments