Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate host port #1138

Merged
merged 8 commits into from
Jul 19, 2023
Merged

Duplicate host port #1138

merged 8 commits into from
Jul 19, 2023

Conversation

hananiel
Copy link
Contributor

@hananiel hananiel commented Jul 6, 2023

Description

Using the extension method UseCloudHosting will ocassionally throw an exception similar to this: 'Failed to bind to address https://127.0.0.1:8083/: address already in use.'

This PR fixes the problem by adds additional filtering for various URL specification to detect duplicates and remove them. In addition when a wild card address is present, it will take precedence over specific ip addresses for a given port.

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

@hananiel hananiel added this to the 3.2.4 milestone Jul 6, 2023
@hananiel hananiel self-assigned this Jul 6, 2023
@TimHess
Copy link
Member

TimHess commented Jul 14, 2023

These changes do appear to fix the issue with no further change, but in my quick testing I think we can simplify further by completely removing references to ASPNETCORE_URLS

Copy link
Member

@TimHess TimHess left a comment

Choose a reason for hiding this comment

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

LGTM

@TimHess
Copy link
Member

TimHess commented Jul 19, 2023

/azp run Steeltoe.All

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sonarcloud
Copy link

sonarcloud bot commented Jul 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@TimHess TimHess merged commit ea9c195 into release/3.2 Jul 19, 2023
23 checks passed
@TimHess TimHess deleted the duplicate_host_port branch July 19, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants