[mongo] Use "ping" command instead of "serverStatus"

"serverStatus" on the "admin" database may fail due to insufficient privileges.
This commit is contained in:
mitmitmitm 2022-12-20 13:07:40 +01:00 committed by Sukchan Lee
parent 38aadb77e0
commit 0ebe07c83d
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ ogs_mongoc_mongoc_client_get_server_status (mongoc_client_t *client, /* IN */
BSON_ASSERT (client);
BSON_APPEND_INT32 (&cmd, "serverStatus", 1);
BSON_APPEND_INT32 (&cmd, "ping", 1);
ret = mongoc_client_command_simple (
client, "admin", &cmd, read_prefs, reply, error);
bson_destroy (&cmd);