-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
814299c
to
ba36e4f
Compare
libbeat/testing/available_port.go
Outdated
|
||
// 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") |
There was a problem hiding this comment.
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.
246cd2a
to
12f0f90
Compare
libbeat/testing/available_port.go
Outdated
import "net" | ||
|
||
// AvailableTCPPort returns an unused TCP port for 127.0.0.1. | ||
func AvailableTCPPort() (uint16, error) { |
There was a problem hiding this comment.
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.
12f0f90
to
4408580
Compare
4408580
to
d68fecd
Compare
Thanks for the cleanup. |
This removes a trivial dep I recently added and substitutes it for a small function.
This removes a trivial dep I recently added and substitutes it for a small function.
This removes a trivial dep I recently added and substitutes it for a small function.