]> Cypherpunks repositories - gostls13.git/commitdiff
net: move testHookSetKeepAlive into hook.go
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 7 Apr 2015 02:37:29 +0000 (11:37 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 7 Apr 2015 03:02:10 +0000 (03:02 +0000)
Change-Id: I1f2d4e3b0351a7a47c3a6073833a17dbc0c7b05c
Reviewed-on: https://go-review.googlesource.com/8520
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/dial.go
src/net/hook.go

index 0424ed250f741f90c59286b3074831dc667fc936..ec48d2d4e2c6ec9252e2f777239f7d75436b784b 100644 (file)
@@ -180,8 +180,6 @@ func (d *Dialer) Dial(network, address string) (Conn, error) {
        return c, err
 }
 
-var testHookSetKeepAlive = func() {} // changed by dial_test.go
-
 // dialMulti attempts to establish connections to each destination of
 // the list of addresses. It will return the first established
 // connection and close the other connections. Otherwise it returns
index 14dc19f68ff3379f2a68cb1b4c856aa5c37f5b9f..32ba15e15a414bd63d868fe2817d2b71a7cab5d0 100644 (file)
@@ -4,4 +4,7 @@
 
 package net
 
-var testHookLookupIP = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
+var (
+       testHookLookupIP     = func(fn func(string) ([]IPAddr, error), host string) ([]IPAddr, error) { return fn(host) }
+       testHookSetKeepAlive = func() {}
+)