@@ -415,11 +415,8 @@ def validate_ok_for_update(update):
415
415
'fsync' : validate_boolean_or_string ,
416
416
'j' : validate_boolean_or_string ,
417
417
'journal' : validate_boolean_or_string ,
418
- 'connecttimeoutms' : validate_timeout_or_none ,
419
418
'maxpoolsize' : validate_positive_integer_or_none ,
420
419
'socketkeepalive' : validate_boolean_or_string ,
421
- 'sockettimeoutms' : validate_timeout_or_none ,
422
- 'waitqueuetimeoutms' : validate_timeout_or_none ,
423
420
'waitqueuemultiple' : validate_non_negative_integer_or_none ,
424
421
'ssl' : validate_boolean_or_string ,
425
422
'ssl_keyfile' : validate_readable ,
@@ -431,7 +428,6 @@ def validate_ok_for_update(update):
431
428
'readpreference' : validate_read_preference_mode ,
432
429
'readpreferencetags' : validate_read_preference_tags ,
433
430
'localthresholdms' : validate_positive_float_or_zero ,
434
- 'serverselectiontimeoutms' : validate_timeout_or_zero ,
435
431
'authmechanism' : validate_auth_mechanism ,
436
432
'authsource' : validate_string ,
437
433
'authmechanismproperties' : validate_auth_mechanism_properties ,
@@ -440,12 +436,20 @@ def validate_ok_for_update(update):
440
436
'connect' : validate_boolean_or_string ,
441
437
}
442
438
439
+ TIMEOUT_VALIDATORS = {
440
+ 'connecttimeoutms' : validate_timeout_or_none ,
441
+ 'sockettimeoutms' : validate_timeout_or_none ,
442
+ 'waitqueuetimeoutms' : validate_timeout_or_none ,
443
+ 'serverselectiontimeoutms' : validate_timeout_or_zero ,
444
+ }
445
+
443
446
KW_VALIDATORS = {
444
447
'document_class' : validate_document_class ,
445
448
'read_preference' : validate_read_preference ,
446
449
'event_listeners' : _validate_event_listeners
447
450
}
448
451
452
+ URI_VALIDATORS .update (TIMEOUT_VALIDATORS )
449
453
VALIDATORS = URI_VALIDATORS .copy ()
450
454
VALIDATORS .update (KW_VALIDATORS )
451
455
0 commit comments