<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:41:31 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-2067] TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2067</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Our current dependency for the .NET Standard artifacts of the .NET driver is on .NET Standard 1.5, which does support Socket.ConnectAsync.&lt;/p&gt;

&lt;p&gt;So we can update our code to use Socket.ConnectAsync now that it is available.&lt;/p&gt;

&lt;p&gt;Note: see pull request.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Original Description&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I have a project with xunit and dotnetcore, and during unit testing I have the below exception only if&lt;/p&gt;

&lt;p&gt;1) I use not localhost but the IP of the machine&lt;br/&gt;
2) I use multithread testing (if I execute unit test sequentially everyting is ok).&lt;/p&gt;

&lt;p&gt;I&apos;ve debugged the driver and I&apos;ll submit a pull request.&lt;/p&gt;

&lt;p&gt;A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = WritableServerSelector, LatencyLimitingServerSelector&lt;/p&gt;
{ AllowedLatencyRange = 00:00:00.0150000 }
&lt;p&gt; }. Client view of cluster state is { ClusterId : &quot;1&quot;, ConnectionMode : &quot;Automatic&quot;, Type : &quot;Unknown&quot;, State : &quot;Disconnected&quot;, Servers : [{ ServerId: &quot;&lt;/p&gt;
{ ClusterId : 1, EndPoint : &quot;10.0.0.40:27017&quot; }
&lt;p&gt;&quot;, EndPoint: &quot;10.0.0.40:27017&quot;, State: &quot;Disconnected&quot;, Type: &quot;Unknown&quot; }] }.&lt;/p&gt;</description>
                <environment></environment>
        <key id="446645">CSHARP-2067</key>
            <summary>TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="alkampfer@nablasoft.com">Gian Maria Ricci</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Oct 2017 15:04:48 +0000</created>
                <updated>Sat, 28 Oct 2023 11:49:14 +0000</updated>
                            <resolved>Tue, 23 Oct 2018 20:16:46 +0000</resolved>
                                    <version>2.4.4</version>
                                    <fixVersion>2.7.1</fixVersion>
                                    <component>Connectivity</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2053735" author="xgen-internal-githook" created="Tue, 6 Nov 2018 20:28:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2067&quot; title=&quot;TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2067&quot;&gt;&lt;del&gt;CSHARP-2067&lt;/del&gt;&lt;/a&gt;: Added Gian Maria Ricci to the contributors list.&lt;br/&gt;
Branch: v2.7.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/156ece78f31c59f43f1942e7dba282381e3f4171&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/156ece78f31c59f43f1942e7dba282381e3f4171&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2053732" author="xgen-internal-githook" created="Tue, 6 Nov 2018 20:28:12 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gian Maria Ricci&apos;, &apos;email&apos;: &apos;ricci.gianmaria@gmail.com&apos;, &apos;username&apos;: &apos;alkampfergit&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2067&quot; title=&quot;TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2067&quot;&gt;&lt;del&gt;CSHARP-2067&lt;/del&gt;&lt;/a&gt;: TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync&lt;br/&gt;
Branch: v2.7.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/fe9ff1f89c006ff826b685c3dc77b763abd9eb02&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/fe9ff1f89c006ff826b685c3dc77b763abd9eb02&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2039734" author="xgen-internal-githook" created="Tue, 23 Oct 2018 20:15:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2067&quot; title=&quot;TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2067&quot;&gt;&lt;del&gt;CSHARP-2067&lt;/del&gt;&lt;/a&gt;: Added Gian Maria Ricci to the contributors list.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/e21e59c0e464cc324bc134060b165ec1e93b2b78&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/e21e59c0e464cc324bc134060b165ec1e93b2b78&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2039733" author="xgen-internal-githook" created="Tue, 23 Oct 2018 20:15:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Gian Maria Ricci&apos;, &apos;email&apos;: &apos;ricci.gianmaria@gmail.com&apos;, &apos;username&apos;: &apos;alkampfergit&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-2067&quot; title=&quot;TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-2067&quot;&gt;&lt;del&gt;CSHARP-2067&lt;/del&gt;&lt;/a&gt;: TcpStreamFactory.ConnectAsync should use Socket.ConnectAsync&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/185125ffc9d4db9b6bb04e766eda6c17befea84b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/185125ffc9d4db9b6bb04e766eda6c17befea84b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1712199" author="asmx1986" created="Mon, 30 Oct 2017 03:02:34 +0000"  >&lt;p&gt;Hi @alkampfer we are facing the same problem here, running the mongo driver inside aspnet core webapi (from vs2017 or dotnet windows command line or even inside docker containers) is just fine, but the timeout exception is triggered when running tests with xunit and connecting to a remote mongodb via IP (the mongodb server is running inside a docker container).&lt;/p&gt;

&lt;p&gt;Will this PR be merged soon?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</comment>
                            <comment id="1701288" author="JIRAUSER1269368" created="Tue, 17 Oct 2017 15:10:44 +0000"  >&lt;p&gt;I&apos;ve done a pull request, that in my specific situation solves the problem: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/pull/297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/pull/297&lt;/a&gt; &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr8wdz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>