File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ function makeConnection(
277
277
: typeof options . connectTimeoutMS === 'number'
278
278
? options . connectTimeoutMS
279
279
: 30000 ;
280
- const socketTimeout = typeof options . socketTimeout === 'number' ? options . socketTimeout : 360000 ;
280
+ const socketTimeout = typeof options . socketTimeout === 'number' ? options . socketTimeout : 0 ;
281
281
const rejectUnauthorized =
282
282
typeof options . rejectUnauthorized === 'boolean' ? options . rejectUnauthorized : true ;
283
283
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export class Connection extends EventEmitter {
99
99
super ( options ) ;
100
100
this . id = options . id ;
101
101
this . address = streamIdentifier ( stream ) ;
102
- this . socketTimeout = options . socketTimeout ?? 360000 ;
102
+ this . socketTimeout = options . socketTimeout ?? 0 ;
103
103
this . monitorCommands = options . monitorCommands ?? options . monitorCommands ;
104
104
this . closed = false ;
105
105
this . destroyed = false ;
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ export function connect(
211
211
const finalOptions = createUnifiedOptions ( urlOptions , options ) ;
212
212
213
213
// Check if we have connection and socket timeout set
214
- if ( finalOptions . socketTimeoutMS == null ) finalOptions . socketTimeoutMS = 360000 ;
214
+ if ( finalOptions . socketTimeoutMS == null ) finalOptions . socketTimeoutMS = 0 ;
215
215
if ( finalOptions . connectTimeoutMS == null ) finalOptions . connectTimeoutMS = 10000 ;
216
216
if ( finalOptions . retryWrites == null ) finalOptions . retryWrites = true ;
217
217
if ( finalOptions . useRecoveryToken == null ) finalOptions . useRecoveryToken = true ;
@@ -582,7 +582,7 @@ function translateOptions(options: any) {
582
582
}
583
583
584
584
// Set the socket and connection timeouts
585
- if ( options . socketTimeoutMS == null ) options . socketTimeoutMS = 360000 ;
585
+ if ( options . socketTimeoutMS == null ) options . socketTimeoutMS = 0 ;
586
586
if ( options . connectTimeoutMS == null ) options . connectTimeoutMS = 10000 ;
587
587
588
588
const translations = {
You can’t perform that action at this time.
0 commit comments