about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-03-15 01:01:43 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-03-15 01:01:43 +0100
commit9f42c13222683bf0f96e72fe10ef7741b1ee69de (patch)
treee0a80892af4a9959a0b2a69e335a9fa1a4c211c8
parentf346deef7e770283f17e74739161370445077853 (diff)
downloadhtping-9f42c13222683bf0f96e72fe10ef7741b1ee69de.tar.gz
htping-9f42c13222683bf0f96e72fe10ef7741b1ee69de.tar.xz
htping-9f42c13222683bf0f96e72fe10ef7741b1ee69de.zip
print TLS verification errors where they appear
-rw-r--r--htping.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/htping.go b/htping.go
index 530514f..395e4ad 100644
--- a/htping.go
+++ b/htping.go
@@ -35,7 +35,6 @@ var keepalive bool
 
 type transport struct {
 	http.RoundTripper
-	msg  string
 	addr string
 }
 
@@ -70,7 +69,7 @@ func newTransport() *transport {
 
 			_, err := certs[0].Verify(opts)
 			if err != nil {
-				tr.msg = err.Error()
+				fmt.Printf("%v\n", err)
 			}
 
 			// succeed
@@ -152,10 +151,6 @@ func ping(url string, seq int, results chan result) {
 
 	dur := float64(stop.Sub(start)) / float64(time.Second)
 
-	if len(myTransport.msg) > 0 {
-		fmt.Printf("%v\n", myTransport.msg)
-	}
-
 	fmt.Printf("%d bytes from %v: %s %d seq=%d time=%.3f ms\n",
 		written,
 		myTransport.addr,