-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.0.2
-
Component/s: None
-
None
-
Environment:CentOS 6.x / x86-64
glibc 2.12 / gcc 4.4.7
When specifying the connectTimeoutMS option e.g
mongodb://localhost/test?connectTimeoutMS=100
This option is ignored and the default of 10000 is used.
This is due to this option being added internally under the name as specified (i.e mixed case) but when it is being checked for in mongoc-client.c::mongoc_client_connect_tcp() it is being searched for in lower case, i.e we have
94 if ((options = mongoc_uri_get_options (uri)) &&
95 bson_iter_init_find (&iter, options, "connecttimeoutms") &&
Above line is the problem.
96 BSON_ITER_HOLDS_INT32 (&iter)) {
97 if (!(connecttimeoutms = bson_iter_int32(&iter)))
101 }
Using ?connecttimeoutms=100 works as expected. This will maybe effect more things, I haven't really looked further.
I'm not sure what the intention is here. All the MongoDB documentation uses mixed case.
Cheers,
Andrew