-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.2.4
-
Component/s: None
-
Empty show more show less
Setting socketTimeoutMS or connectTimeoutMS to 0 when calling MongoClient.connect(url, options, callback) results in a timeout value of 120000.
This code in mongo_client.js does not correctly handle a setting of 0:
// Check if we have connection and socket timeout set
if(!_finalOptions.socketTimeoutMS) _finalOptions.socketTimeoutMS = 120000;
if(!_finalOptions.connectTimeoutMS) _finalOptions.connectTimeoutMS = 120000;