Skip to content

Commit be03843

Browse files
CDRIVER-4812 Single-threaded monitoring commands may include saslSupportedMechs beyond initial handshake
1 parent e1e9495 commit be03843

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/libmongoc/src/mongoc/mongoc-topology-scanner.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ _reset_hello (mongoc_topology_scanner_t *ts)
158158
_add_hello (ts);
159159
}
160160

161+
void
162+
_mongoc_topology_scanner_node_parse_sasl_supported_mechs (const bson_t *hello, mongoc_topology_scanner_node_t *node)
163+
{
164+
_mongoc_handshake_parse_sasl_supported_mechs (hello, &node->sasl_supported_mechs);
165+
node->negotiated_sasl_supported_mechs = true;
166+
}
167+
161168
const char *
162169
_mongoc_topology_scanner_get_speculative_auth_mechanism (const mongoc_uri_t *uri)
163170
{
@@ -692,7 +699,7 @@ _async_success (mongoc_async_cmd_t *acmd, const bson_t *hello_response, int64_t
692699
}
693700

694701
if (ts->negotiate_sasl_supported_mechs && !node->negotiated_sasl_supported_mechs) {
695-
_mongoc_handshake_parse_sasl_supported_mechs (hello_response, &node->sasl_supported_mechs);
702+
_mongoc_topology_scanner_node_parse_sasl_supported_mechs (hello_response, node);
696703
}
697704

698705
if (ts->speculative_authentication) {

0 commit comments

Comments
 (0)