Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Fix ConnectAsync not throwing exception for already connected Socket #27173

Merged
merged 1 commit into from
Feb 22, 2018
Merged

Fix ConnectAsync not throwing exception for already connected Socket #27173

merged 1 commit into from
Feb 22, 2018

Conversation

wtgodbe
Copy link
Member

@wtgodbe wtgodbe commented Feb 15, 2018

For issue https://github.com/dotnet/corefx/issues/22765. @geoffkizer @wfurt PTAL

The previously failing tests are now passing for me locally, running a full test suite to make sure this doesn't regress anything else.

@wtgodbe wtgodbe added the * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Feb 15, 2018
@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 15, 2018

@dotnet-bot test outerloop_netcoreapp_ubuntu16.10_release

@wtgodbe wtgodbe closed this Feb 15, 2018
@wtgodbe wtgodbe reopened this Feb 15, 2018
@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 15, 2018

@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release

@@ -44,9 +44,7 @@ public abstract class Connect<T> : SocketTestHelperBase<T> where T : SocketHelpe
}
}

[OuterLoop] // TODO: Issue #11345
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO - put this back in

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release

1 similar comment
@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug

@wtgodbe wtgodbe changed the title DNM - testing socket issue Fix ConnectAsync not throwing exception for already connected Socket Feb 21, 2018
@wtgodbe wtgodbe removed the * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) label Feb 21, 2018
@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@dotnet-bot help

@dotnet-bot
Copy link

Welcome to the dotnet/corefx Repository

The following is a list of valid commands on this PR. To invoke a command, comment the indicated phrase on the PR

The following commands are valid for all PRs and repositories.

Click to expand
Comment Phrase Action
@dotnet-bot test this please Re-run all legs. Use sparingly
@dotnet-bot test ci please Generates (but does not run) jobs based on changes to the groovy job definitions in this branch
@dotnet-bot help Print this help message

The following jobs are launched by default for each PR against dotnet/corefx:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test Alpine.3.6 x64 Debug Build Alpine.3.6 x64 Debug Build
@dotnet-bot test Linux x64 Release Build Linux x64 Release Build
@dotnet-bot test OSX x64 Debug Build OSX x64 Debug Build
@dotnet-bot test Packaging All Configurations x64 Debug Build Packaging All Configurations x64 Debug Build
@dotnet-bot test Windows x64 Debug Build Windows x64 Debug Build
@dotnet-bot test Windows x86 Release Build Windows x86 Release Build
@dotnet-bot test NETFX x86 Release Build NETFX x86 Release Build

The following optional jobs are available in PRs against dotnet/corefx:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test Outerloop Alpine.3.6 x64 Debug Build Queues Outerloop Alpine.3.6 x64 Debug Build
@dotnet-bot test Alpine.3.6 x64 Release Build Queues Alpine.3.6 x64 Release Build
@dotnet-bot test Outerloop Alpine.3.6 x64 Release Build Queues Outerloop Alpine.3.6 x64 Release Build
@dotnet-bot test CentOS.6 x64 Debug Build Queues CentOS.6 x64 Debug Build
@dotnet-bot test Outerloop CentOS.6 x64 Debug Build Queues Outerloop CentOS.6 x64 Debug Build
@dotnet-bot test CentOS.6 x64 Release Build Queues CentOS.6 x64 Release Build
@dotnet-bot test Outerloop CentOS.6 x64 Release Build Queues Outerloop CentOS.6 x64 Release Build
@dotnet-bot test Linux x64 Debug Build Queues Linux x64 Debug Build
@dotnet-bot test Outerloop Linux x64 Debug Build Queues Outerloop Linux x64 Debug Build
@dotnet-bot test Outerloop Linux x64 Release Build Queues Outerloop Linux x64 Release Build
@dotnet-bot test Outerloop OSX x64 Debug Build Queues Outerloop OSX x64 Debug Build
@dotnet-bot test OSX x64 Release Build Queues OSX x64 Release Build
@dotnet-bot test Outerloop OSX x64 Release Build Queues Outerloop OSX x64 Release Build
@dotnet-bot test Outerloop Packaging All Configurations x64 Debug Build Queues Outerloop Packaging All Configurations x64 Debug Build
@dotnet-bot test Packaging All Configurations x86 Debug Build Queues Packaging All Configurations x86 Debug Build
@dotnet-bot test Outerloop Packaging All Configurations x86 Debug Build Queues Outerloop Packaging All Configurations x86 Debug Build
@dotnet-bot test Packaging All Configurations x64 Release Build Queues Packaging All Configurations x64 Release Build
@dotnet-bot test Outerloop Packaging All Configurations x64 Release Build Queues Outerloop Packaging All Configurations x64 Release Build
@dotnet-bot test Packaging All Configurations x86 Release Build Queues Packaging All Configurations x86 Release Build
@dotnet-bot test Outerloop Packaging All Configurations x86 Release Build Queues Outerloop Packaging All Configurations x86 Release Build
@dotnet-bot test Outerloop Windows x64 Debug Build Queues Outerloop Windows x64 Debug Build
@dotnet-bot test Windows x86 Debug Build Queues Windows x86 Debug Build
@dotnet-bot test Outerloop Windows x86 Debug Build Queues Outerloop Windows x86 Debug Build
@dotnet-bot test Windows x64 Release Build Queues Windows x64 Release Build
@dotnet-bot test Outerloop Windows x64 Release Build Queues Outerloop Windows x64 Release Build
@dotnet-bot test Outerloop Windows x86 Release Build Queues Outerloop Windows x86 Release Build
@dotnet-bot test NETFX x64 Debug Build Queues NETFX x64 Debug Build
@dotnet-bot test Outerloop NETFX x64 Debug Build Queues Outerloop NETFX x64 Debug Build
@dotnet-bot test NETFX x86 Debug Build Queues NETFX x86 Debug Build
@dotnet-bot test Outerloop NETFX x86 Debug Build Queues Outerloop NETFX x86 Debug Build
@dotnet-bot test NETFX x64 Release Build Queues NETFX x64 Release Build
@dotnet-bot test Outerloop NETFX x64 Release Build Queues Outerloop NETFX x64 Release Build
@dotnet-bot test Outerloop NETFX x86 Release Build Queues Outerloop NETFX x86 Release Build

Have a nice day!

@dotnet-bot
Copy link

Welcome to the dotnet/corefx Repository

The following is a list of valid commands on this PR. To invoke a command, comment the indicated phrase on the PR

The following commands are valid for all PRs and repositories.

Click to expand
Comment Phrase Action
@dotnet-bot test this please Re-run all legs. Use sparingly
@dotnet-bot test ci please Generates (but does not run) jobs based on changes to the groovy job definitions in this branch
@dotnet-bot help Print this help message

The following jobs are launched by default for each PR against dotnet/corefx:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test Linux arm Release Build Linux arm Release Build
@dotnet-bot test Tizen armel Debug Build Tizen armel Debug Build

The following optional jobs are available in PRs against dotnet/corefx:master.

Click to expand
Comment Phrase Job Launched
@dotnet-bot test innerloop CentOS7.1 Debug Queues Innerloop CentOS7.1 Debug x64 Build and Test
@dotnet-bot test innerloop CentOS7.1 Release Queues Innerloop CentOS7.1 Release x64 Build and Test
@dotnet-bot test code coverage Queues Code Coverage Windows Debug
@dotnet-bot test innerloop Debian8.4 Debug Queues Innerloop Debian8.4 Debug x64 Build and Test
@dotnet-bot test innerloop Debian8.4 Release Queues Innerloop Debian8.4 Release x64 Build and Test
@dotnet-bot test innerloop Fedora24 Debug Queues Innerloop Fedora24 Debug x64 Build and Test
@dotnet-bot test innerloop Fedora24 Release Queues Innerloop Fedora24 Release x64 Build and Test
@dotnet-bot test Linux arm Debug Queues Linux arm Debug Build
@dotnet-bot test code formatter check Queues Code Formatter Check
@dotnet-bot test innerloop OSX10.12 Debug Queues Innerloop OSX10.12 Debug x64 Build and Test
@dotnet-bot test innerloop OSX10.12 Release Queues Innerloop OSX10.12 Release x64 Build and Test
@dotnet-bot test outerloop netcoreapp CentOS7.1 Debug Queues OuterLoop netcoreapp CentOS7.1 Debug x64
@dotnet-bot test outerloop netcoreapp CentOS7.1 Release Queues OuterLoop netcoreapp CentOS7.1 Release x64
@dotnet-bot test outerloop netcoreapp Debian8.4 Debug Queues OuterLoop netcoreapp Debian8.4 Debug x64
@dotnet-bot test outerloop netcoreapp Debian8.4 Release Queues OuterLoop netcoreapp Debian8.4 Release x64
@dotnet-bot test outerloop netcoreapp Fedora24 Debug Queues OuterLoop netcoreapp Fedora24 Debug x64
@dotnet-bot test outerloop netcoreapp Fedora24 Release Queues OuterLoop netcoreapp Fedora24 Release x64
@dotnet-bot test outerloop netcoreapp OSX10.12 Debug Queues OuterLoop netcoreapp OSX10.12 Debug x64
@dotnet-bot test outerloop netcoreapp OSX10.12 Release Queues OuterLoop netcoreapp OSX10.12 Release x64
@dotnet-bot test outerloop netcoreapp PortableLinux Debug Queues OuterLoop netcoreapp PortableLinux Debug x64
@dotnet-bot test outerloop netcoreapp PortableLinux Release Queues OuterLoop netcoreapp PortableLinux Release x64
@dotnet-bot test outerloop netcoreapp RHEL7.2 Debug Queues OuterLoop netcoreapp RHEL7.2 Debug x64
@dotnet-bot test outerloop netcoreapp RHEL7.2 Release Queues OuterLoop netcoreapp RHEL7.2 Release x64
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Debug Queues OuterLoop netcoreapp Ubuntu14.04 Debug x64
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release Queues OuterLoop netcoreapp Ubuntu14.04 Release x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.04 Debug Queues OuterLoop netcoreapp Ubuntu16.04 Debug x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.04 Release Queues OuterLoop netcoreapp Ubuntu16.04 Release x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug Queues OuterLoop netcoreapp Ubuntu16.10 Debug x64
@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Release Queues OuterLoop netcoreapp Ubuntu16.10 Release x64
@dotnet-bot test outerloop netcoreapp Windows 7 Debug Queues OuterLoop netcoreapp Windows 7 Debug x64
@dotnet-bot test outerloop netcoreapp Windows 7 Release Queues OuterLoop netcoreapp Windows 7 Release x64
@dotnet-bot test outerloop netcoreapp Windows_NT Debug Queues OuterLoop netcoreapp Windows_NT Debug x64
@dotnet-bot test outerloop netcoreapp Windows_NT Release Queues OuterLoop netcoreapp Windows_NT Release x64
@dotnet-bot test innerloop PortableLinux Debug Queues Innerloop PortableLinux Debug x64 Build and Test
@dotnet-bot test innerloop PortableLinux Release Queues Innerloop PortableLinux Release x64 Build and Test
@dotnet-bot test innerloop RHEL7.2 Debug Queues Innerloop RHEL7.2 Debug x64 Build and Test
@dotnet-bot test innerloop RHEL7.2 Release Queues Innerloop RHEL7.2 Release x64 Build and Test
@dotnet-bot test Tizen armel Release Queues Tizen armel Release Build
@dotnet-bot test innerloop Ubuntu14.04 Debug Queues Innerloop Ubuntu14.04 Debug x64 Build and Test
@dotnet-bot test innerloop Ubuntu14.04 Release Queues Innerloop Ubuntu14.04 Release x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.04 Debug Queues Innerloop Ubuntu16.04 Debug x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.04 Release Queues Innerloop Ubuntu16.04 Release x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.10 Debug Queues Innerloop Ubuntu16.10 Debug x64 Build and Test
@dotnet-bot test innerloop Ubuntu16.10 Release Queues Innerloop Ubuntu16.10 Release x64 Build and Test
@dotnet-bot test innerloop Windows_NT Debug Queues Innerloop Windows_NT Debug x86 Build and Test
@dotnet-bot test innerloop Windows_NT Release Queues Innerloop Windows_NT Release x64 Build and Test

Have a nice day!

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@dotnet-bot test Outerloop Windows x64 Debug Build

@@ -115,6 +115,11 @@ private Task<Socket> AcceptAsyncApm(Socket acceptSocket)

internal Task ConnectAsync(EndPoint remoteEP)
{
// Throw up front if we are already connected
if (this.Connected)
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this and the other methods in this file are just wrappers to BeginConnect, I don't think we need to check this here, do we?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Do you think we need to add the check to the other versions of BeginConnect, such as

public IAsyncResult BeginConnect(string host, int port, AsyncCallback requestCallback, object state)
? I only added it to the code paths we hit in the test cases so far.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should be consistent about doing the check in all variations of Connect/BeginConnect.

Copy link

@geoffkizer geoffkizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine in general, one comment above.

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release
@dotnet-bot test Outerloop Windows x64 Debug Build

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

@geoffkizer checks have been updated, and the WebSockets test that was failing in the last commit is passing for me locally.

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

Mission Control doesn't actually show any test failures for the failing Windows job - https://mc.dot.net/#/user/wtgodbe/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/fdf2e53ca078f7a23cdb16df66ee642bb0d79ad6

Here's the link to the job: https://ci3.dot.net/job/dotnet_corefx/job/master/job/windows-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_true_prtest/259/

Not sure what's going on there, so will run again.

@dotnet-bot test Outerloop Windows x64 Debug Build

@geoffkizer
Copy link

LGTM

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 21, 2018

Looks like test failures are on tests added 2 hours ago - 5b51318. I'll try rebasing.

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 22, 2018

@dotnet-bot test outerloop netcoreapp Ubuntu16.10 Debug
@dotnet-bot test outerloop netcoreapp Ubuntu14.04 Release
@dotnet-bot test Outerloop Windows x64 Debug Build

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 22, 2018

@bartonjs one of the outerloop tests you added in 5b51318 is failing in this job (in the Ubuntu Outerloop jobs), does it seem related?

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 22, 2018

The NetFx failure is in System.Net.Http.Functional.Tests - I'm not seeing such a failure in other recent jobs, so it must be related. I'll take a look. As for the Outerloop Windows x64 job, that job has been failing consistently for a while on all PRs, and the test results in MC show no failures, so that seems unrelated.

@geoffkizer
Copy link

The netfx failure is #27363. I have a fix out. You can ignore.

@wtgodbe
Copy link
Member Author

wtgodbe commented Feb 22, 2018

@geoffkizer in that case, pending Jeremy's confirmation about the Crypto failures, is this good to merge?

@geoffkizer
Copy link

Yep, go for it

@bartonjs
Copy link
Member

@wtgodbe If it was Decrypt_512_CekDoesNotDecrypt_FixedValue, that was my bug, and is fixed now.

@wtgodbe wtgodbe merged commit fb17ad8 into dotnet:master Feb 22, 2018
@karelz karelz added this to the 2.1.0 milestone Mar 10, 2018
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants