-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.2-beta0
-
Component/s: None
-
None
Even with serverSelectionTryOnce true, if the server hangs up on an "ismaster" call, mongoc_async_run spins serverSelectionTimeoutMS (default 30 seconds) before giving up and returning to mongoc_topology_select.
When mongoc_stream_read returns 0 it means the server has shut down the connection, but the 0 return is not properly handled so the async_cmd_t remains in the "receiving" phase. The socket appears readable so mongoc_async_run doesn't block on "poll", hence the 100% CPU spin until the timeout.