|
On Windows, attempted connections to the wrong address can take 1-2s to fail. I observed this when connecting to a mongod that was not bound to IPv6 (i.e. no --ipv6 flag passed).
For single-threaded monitoring, this is mitigated by happy eyeballs. But for establishing multi-threaded application connections, this could appear as a 1-2s block. After CDRIVER-3625, this will also effect multi-threaded monitoring.
With some added debug logging, the delay occurs in the call to "select" here: https://github.com/mongodb/mongo-c-driver/blob/master/src/libmongoc/src/mongoc/mongoc-socket.c#L207
Capturing traffic with wireshark shows repeated TCP retransmits (capture file attached).
This branch includes more logging and a simplified example-client to reproduce: https://github.com/kevinAlbs/mongo-c-driver/tree/slow-select
|