[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [meek/utls_2] Only ignore the error we expect from the phoney test server.
commit f6f8a7b4f16100566b548a8f44b15f9360292cb7
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Wed Feb 6 18:24:16 2019 -0700
Only ignore the error we expect from the phoney test server.
---
meek-client/proxy_test.go | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meek-client/proxy_test.go b/meek-client/proxy_test.go
index 820f580..555e620 100644
--- a/meek-client/proxy_test.go
+++ b/meek-client/proxy_test.go
@@ -8,6 +8,7 @@ import (
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
+ "io"
"math/big"
"net"
"net/http"
@@ -101,8 +102,12 @@ func requestResultingFromDial(t *testing.T, ln net.Listener, makeProxy func(addr
if err != nil {
return nil, err
}
- // The Dial fails because the goroutine "server" hangs up.
- _, _ = pr.Dial(network, addr)
+ // The Dial fails because the goroutine "server" hangs up. So ignore an
+ // ErrUnexpectedEOF error.
+ _, err = pr.Dial(network, addr)
+ if err != nil && err != io.ErrUnexpectedEOF {
+ return nil, err
+ }
return <-ch, nil
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits