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 11import { clearTimeout , setTimeout } from 'timers' ;
22
3- import { MongoOperationTimeoutError , MongoRuntimeError } from './error' ;
3+ import { MongoRuntimeError } from './error' ;
44import { noop } from './utils' ;
55
66/** @internal */
@@ -260,15 +260,13 @@ export class CSOTTimeoutContext extends TimeoutContext {
260260 get timeoutForSocketWrite ( ) : Timeout | null {
261261 const { remainingTimeMS } = this ;
262262 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 ) ;
265264 }
266265
267266 get timeoutForSocketRead ( ) : Timeout | null {
268267 const { remainingTimeMS } = this ;
269268 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 ) ;
272270 }
273271}
274272
You can’t perform that action at this time.
0 commit comments