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

feat: return tcp.Address from listener, if exists #336

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

AeroNotix
Copy link
Contributor

  • This is the more accurate and correct address of the listener
  • Useful if you want to listen on port 0 to dynamically create listeners (think of unit/integration tests)

* This is the more accurate and correct address of the listener
* Useful if you want to listen on port 0 to dynamically create
listeners (think of unit/integration tests)
@mochi-co
Copy link
Collaborator

This looks good to me, but interested to see if anyone is aware of any potential risks

@AeroNotix
Copy link
Contributor Author

This should always match what the original data was unless port 0 was selected. Don't think there should be any risk?

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7294218994

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 98.749%

Changes Missing Coverage Covered Lines Changed/Added Lines %
listeners/tcp.go 1 3 33.33%
Totals Coverage Status
Change from base Build 7294210300: -0.04%
Covered Lines: 5527
Relevant Lines: 5597

💛 - Coveralls

@mochi-co
Copy link
Collaborator

@AeroNotix As nobody else has any concerns, and I agree with your assessment, so it's getting merged. I think this is a great idea. Thank you very much!

@mochi-co mochi-co merged commit 5523d15 into mochi-mqtt:main Dec 21, 2023
3 checks passed
@AeroNotix AeroNotix deleted the feat/tcp-address-from-listener branch December 22, 2023 11:42
@AeroNotix
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants