Forráskód Böngészése

Fix: Windows syntax errors introduced in 48611af

Rod Hynes 8 éve
szülő
commit
79b1204d44
2 módosított fájl, 3 hozzáadás és 3 törlés
  1. 2 2
      psiphon/LookupIP_nobind.go
  2. 1 1
      psiphon/TCPConn_nobind.go

+ 2 - 2
psiphon/LookupIP_nobind.go

@@ -31,7 +31,7 @@ import (
 
 // LookupIP resolves a hostname. When BindToDevice is not required, it
 // simply uses net.LookupIP.
-func LookupIP(ctx context.Context, host string, _ *DialConfig) ([]net.IP, error) {
+func LookupIP(ctx context.Context, host string, config *DialConfig) ([]net.IP, error) {
 
 	if config.DeviceBinder != nil {
 		return nil, common.ContextError(errors.New("LookupIP with DeviceBinder not supported on this platform"))
@@ -42,7 +42,7 @@ func LookupIP(ctx context.Context, host string, _ *DialConfig) ([]net.IP, error)
 		return nil, common.ContextError(err)
 	}
 
-	ips := make([]netIP, len(addrs))
+	ips := make([]net.IP, len(addrs))
 	for i, addr := range addrs {
 		ips[i] = addr.IP
 	}

+ 1 - 1
psiphon/TCPConn_nobind.go

@@ -38,7 +38,7 @@ func tcpDial(ctx context.Context, addr string, config *DialConfig) (net.Conn, er
 
 	dialer := net.Dialer{}
 
-	conn, err := dialer.DialContext(ctx, "tcp", addr, config.ConnectTimeout)
+	conn, err := dialer.DialContext(ctx, "tcp", addr)
 
 	if err != nil {
 		return nil, common.ContextError(err)