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

Replace freeport with independent impl. #7853

Merged
merged 1 commit into from
Aug 7, 2018

Conversation

andrewvc
Copy link
Contributor

@andrewvc andrewvc commented Aug 3, 2018

This removes a trivial dep I recently added and substitutes it for a small function.


// AvailableTCPPort returns an unused TCP port for 127.0.0.1.
func AvailableTCPPort() (uint16, error) {
resolved, err := net.ResolveTCPAddr("ip4", "127.0.0.1:0")
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this causes some troubles on CI.

@andrewvc andrewvc force-pushed the removefreeport branch 2 times, most recently from 246cd2a to 12f0f90 Compare August 6, 2018 16:10
import "net"

// AvailableTCPPort returns an unused TCP port for 127.0.0.1.
func AvailableTCPPort() (uint16, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps the name should include TCP4? You might want to add a TCP6 version in the future.

@ruflin ruflin merged commit 2fafe3d into elastic:master Aug 7, 2018
@ruflin
Copy link
Member

ruflin commented Aug 7, 2018

Thanks for the cleanup.

andrewvc added a commit to andrewvc/beats that referenced this pull request Aug 15, 2018
This removes a trivial dep I recently added and substitutes it for a small function.
ruflin pushed a commit that referenced this pull request Aug 16, 2018
This removes a trivial dep I recently added and substitutes it for a small function.
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

3 participants