Rod Hynes 11 лет назад
Родитель
Сommit
59076a9e7b
1 измененных файлов с 3 добавлено и 3 удалено
  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() {
 		var err error
 		netConn, err = net.DialTimeout("tcp", addr, config.ConnectTimeout)
-		errChannel <- err
+		conn.interruptible.errChannel <- err
 	}()
 
 	// Block until Dial completes (or times out) or until interrupt
-	err = <-errChannel
+	err = <-conn.interruptible.errChannel
 	config.PendingConns.Remove(conn)
 	if err != nil {
 		return nil, ContextError(err)
@@ -68,6 +68,6 @@ func interruptibleTCPDial(addr string, config *DialConfig) (conn *TCPConn, err e
 }
 
 func interruptibleTCPClose(interruptible interruptibleTCPSocket) error {
-	interruptible <- errors.New("socket interrupted")
+	interruptible.errChannel <- errors.New("socket interrupted")
 	return nil
 }