@@ -124,6 +124,7 @@ mongoc_topology_scanner_add_and_scan (mongoc_topology_scanner_t *ts,
124
124
125
125
node = mongoc_topology_scanner_add (ts , host , id );
126
126
127
+ /* begin non-blocking connection, don't wait for success */
127
128
if (node && mongoc_topology_scanner_node_setup (node , & node -> last_error )) {
128
129
node -> cmd = mongoc_async_cmd (
129
130
ts -> async , node -> stream , ts -> setup ,
@@ -276,6 +277,17 @@ mongoc_topology_scanner_ismaster_handler (mongoc_async_cmd_result_t async_status
276
277
node -> ts -> cb_data , error );
277
278
}
278
279
280
+ /*
281
+ *--------------------------------------------------------------------------
282
+ *
283
+ * mongoc_topology_scanner_node_connect_tcp --
284
+ *
285
+ * Create a socket stream for this node, begin a non-blocking
286
+ * connect and return.
287
+ *
288
+ *--------------------------------------------------------------------------
289
+ */
290
+
279
291
static mongoc_stream_t *
280
292
mongoc_topology_scanner_node_connect_tcp (mongoc_topology_scanner_node_t * node ,
281
293
bson_error_t * error )
@@ -404,6 +416,17 @@ mongoc_topology_scanner_node_connect_unix (mongoc_topology_scanner_node_t *node,
404
416
#endif
405
417
}
406
418
419
+
420
+ /*
421
+ *--------------------------------------------------------------------------
422
+ *
423
+ * mongoc_topology_scanner_node_setup --
424
+ *
425
+ * Create a stream and begin a non-blocking connect.
426
+ *
427
+ *--------------------------------------------------------------------------
428
+ */
429
+
407
430
bool
408
431
mongoc_topology_scanner_node_setup (mongoc_topology_scanner_node_t * node , bson_error_t * error )
409
432
{
0 commit comments