commit 3d7a109d01e462491740b22038474541d0e59907 Author: David Fifield david@bamsoftware.com Date: Thu Dec 12 21:02:29 2013 -0800
On second thought, return a TCPConn from DialOr.
By analogy with net.DialTCP. --- pt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pt.go b/pt.go index eae604d..1e60d6c 100644 --- a/pt.go +++ b/pt.go @@ -769,10 +769,10 @@ func extOrPortSetup(s io.ReadWriter, addr net.Addr, methodName string) error { }
// Dial info.ExtendedOrAddr if defined, or else info.OrAddr, and return an open -// net.Conn. If connecting to the extended OR port, extended OR port +// *net.TCPConn. If connecting to the extended OR port, extended OR port // authentication à la 217-ext-orport-auth.txt is done before returning; an // error is returned if authentication fails. -func DialOr(info *ServerInfo, addr net.Addr, methodName string) (net.Conn, error) { +func DialOr(info *ServerInfo, addr net.Addr, methodName string) (*net.TCPConn, error) { if info.ExtendedOrAddr == nil || info.AuthCookie == nil { return net.DialTCP("tcp", nil, info.OrAddr) }
tor-commits@lists.torproject.org