mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-26 01:01:01 +00:00
Merge pull request #104 from prometheus/mr/fix-tests
Fix TravisCI tests: Force IPv4 for the mock TCP listener
This commit is contained in:
commit
ff308119cf
1 changed files with 3 additions and 1 deletions
|
@ -124,7 +124,9 @@ type mockStatsDTCPListener struct {
|
|||
}
|
||||
|
||||
func (ml *mockStatsDTCPListener) handlePacket(packet []byte, e chan<- Events) {
|
||||
lc, err := net.ListenTCP("tcp", nil)
|
||||
// Forcing IPv4 because the TravisCI build environment does not have IPv6
|
||||
// addresses.
|
||||
lc, err := net.ListenTCP("tcp4", nil)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("mockStatsDTCPListener: listen failed: %v", err))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue