diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-03-18 18:58:30 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-18 18:58:30 -0700 |
commit | 79389f8abb3c23d570d82e976124009a8fd181e1 (patch) | |
tree | 31f24f6803cc83186ed69e384ce38cb6831d3286 /test/iptables/iptables_util.go | |
parent | c3cee7f5a433708a394cee4e89c223f80036f5d9 (diff) | |
parent | a8f9cc87989979b6d8bc3759e64bdd1b76329b64 (diff) |
Merge pull request #2187 from kevinGC:deflake-connectTCP
PiperOrigin-RevId: 301716568
Diffstat (limited to 'test/iptables/iptables_util.go')
-rw-r--r-- | test/iptables/iptables_util.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/iptables/iptables_util.go b/test/iptables/iptables_util.go index e8ae65c5a..134391e8d 100644 --- a/test/iptables/iptables_util.go +++ b/test/iptables/iptables_util.go @@ -144,7 +144,7 @@ func connectTCP(ip net.IP, port int, timeout time.Duration) error { // The container may not be listening when we first connect, so retry // upon error. callback := func() error { - conn, err := net.DialTCP("tcp4", nil, &contAddr) + conn, err := net.DialTimeout("tcp", contAddr.String(), timeout) if conn != nil { conn.Close() } |