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

client.go fix addMissingPort() #1444

merged 2 commits into from Nov 28, 2022


Copy link

@stokito stokito commented Nov 25, 2022

Currently it has a minor bug when the default port is not added for IPv6 addreses.
Likely in practice it doesn't affect the system.
Anyway please accept the PR that improves a performance a little bit and also exposes the addMissingPort() so that we can use it our apps code (now I had to copy the func).

client.go Show resolved Hide resolved
@stokito stokito force-pushed the add_port branch 2 times, most recently from 606562f to 34b3f3c Compare Nov 25, 2022
Copy link

@erikdubbelboer erikdubbelboer left a comment

Choose a reason for hiding this comment

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

Looks good but your test seems to be failing.

It's needed for those who creates the instance of the HostClient manually.
Previously for IPv6 addresses the default port wasn't added.
The fix adding a test and optimization that should avoid itoa() call and reduce a memory usage
Copy link
Contributor Author

stokito commented Nov 27, 2022

@erikdubbelboer now the pr is ready to be merged.
@li-jin-gou thank you for your contribution. 👍

@erikdubbelboer erikdubbelboer merged commit c50de95 into valyala:master Nov 28, 2022
10 of 14 checks passed
Copy link


@stokito stokito deleted the add_port branch Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants