-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 2.4.4
-
Component/s: Connectivity
-
None
When TcpStreamFactory.ConnectAsync was first implemented the .NET Core implementation of Socket did not have a ConnectAsync method so it was simulated by using Task.Run.
Our current dependency for the .NET Standard artifacts of the .NET driver is on .NET Standard 1.5, which does support Socket.ConnectAsync.
So we can update our code to use Socket.ConnectAsync now that it is available.
Note: see pull request.
Original Description
I have a project with xunit and dotnetcore, and during unit testing I have the below exception only if
1) I use not localhost but the IP of the machine
2) I use multithread testing (if I execute unit test sequentially everyting is ok).
I've debugged the driver and I'll submit a pull request.
A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector
{ AllowedLatencyRange = 00:00:00.0150000 }}. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "
{ ClusterId : 1, EndPoint : "10.0.0.40:27017" }", EndPoint: "10.0.0.40:27017", State: "Disconnected", Type: "Unknown" }] }.