Browse Source

Fix build on Windows

Rod Hynes 11 years ago
parent
commit
59076a9e7b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      psiphon/TCPConn_windows.go

+ 3 - 3
psiphon/TCPConn_windows.go

@@ -53,11 +53,11 @@ func interruptibleTCPDial(addr string, config *DialConfig) (conn *TCPConn, err e
 	go func() {
 	go func() {
 		var err error
 		var err error
 		netConn, err = net.DialTimeout("tcp", addr, config.ConnectTimeout)
 		netConn, err = net.DialTimeout("tcp", addr, config.ConnectTimeout)
-		errChannel <- err
+		conn.interruptible.errChannel <- err
 	}()
 	}()
 
 
 	// Block until Dial completes (or times out) or until interrupt
 	// Block until Dial completes (or times out) or until interrupt
-	err = <-errChannel
+	err = <-conn.interruptible.errChannel
 	config.PendingConns.Remove(conn)
 	config.PendingConns.Remove(conn)
 	if err != nil {
 	if err != nil {
 		return nil, ContextError(err)
 		return nil, ContextError(err)
@@ -68,6 +68,6 @@ func interruptibleTCPDial(addr string, config *DialConfig) (conn *TCPConn, err e
 }
 }
 
 
 func interruptibleTCPClose(interruptible interruptibleTCPSocket) error {
 func interruptibleTCPClose(interruptible interruptibleTCPSocket) error {
-	interruptible <- errors.New("socket interrupted")
+	interruptible.errChannel <- errors.New("socket interrupted")
 	return nil
 	return nil
 }
 }