Skip to content

Commit 1441154

Browse files
benjirewiskevinAlbs
authored andcommitted
CDRIVER-3942 Bump mongocryptd server selection t/o to 10 seconds (#790)
1 parent f3a9e68 commit 1441154

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/libmongoc/src/mongoc/mongoc-client-side-encryption.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,10 @@ _do_spawn (const char *path, char **args, bson_error_t *error)
945945
exit (EXIT_SUCCESS);
946946
}
947947

948-
/* If we later decide to change the working directory for the pid file path, possibly change the
949-
* process's working directory with chdir like: `chdir (default_pid_path)`.
950-
* Currently pid file ends up in application's working directory. */
948+
/* If we later decide to change the working directory for the pid file path,
949+
* possibly change the process's working directory with chdir like: `chdir
950+
* (default_pid_path)`. Currently pid file ends up in application's working
951+
* directory. */
951952

952953
/* Set the user file creation mask to zero. */
953954
umask (0);
@@ -1155,7 +1156,7 @@ _parse_extra (const bson_t *extra,
11551156
}
11561157

11571158
if (!mongoc_uri_set_option_as_int32 (
1158-
*uri, MONGOC_URI_SERVERSELECTIONTIMEOUTMS, 5000)) {
1159+
*uri, MONGOC_URI_SERVERSELECTIONTIMEOUTMS, 10000)) {
11591160
_uri_construction_error (error);
11601161
GOTO (fail);
11611162
}
@@ -1292,10 +1293,10 @@ _mongoc_cse_client_enable_auto_encryption (mongoc_client_t *client,
12921293
client->topology->mongocryptd_client->topology);
12931294

12941295
/* Also, since single threaded server selection can foreseeably take
1295-
* connectTimeoutMS (which by default is longer than 5 seconds), reduce
1296+
* connectTimeoutMS (which by default is longer than 10 seconds), reduce
12961297
* this as well. */
12971298
if (!mongoc_uri_set_option_as_int32 (
1298-
mongocryptd_uri, MONGOC_URI_CONNECTTIMEOUTMS, 5000)) {
1299+
mongocryptd_uri, MONGOC_URI_CONNECTTIMEOUTMS, 10000)) {
12991300
_uri_construction_error (error);
13001301
GOTO (fail);
13011302
}

0 commit comments

Comments
 (0)