Skip to content
Snippets Groups Projects
Commit 6090580c authored by Jonah Husson's avatar Jonah Husson
Browse files

Remove print

parent 5d9ef9b0
No related branches found
No related tags found
2 merge requests!61Hotfix/fix is online,!39Merge release into master
...@@ -3,7 +3,6 @@ package connect ...@@ -3,7 +3,6 @@ package connect
import ( import (
"crypto/tls" "crypto/tls"
"crypto/x509" "crypto/x509"
"fmt"
"net/http" "net/http"
"net/http/httptrace" "net/http/httptrace"
"regexp" "regexp"
...@@ -214,13 +213,13 @@ func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time. ...@@ -214,13 +213,13 @@ func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time.
trace := &httptrace.ClientTrace{ trace := &httptrace.ClientTrace{
DNSDone: func(dnsInfo httptrace.DNSDoneInfo) { DNSDone: func(dnsInfo httptrace.DNSDoneInfo) {
jww.DEBUG.Printf("DNS Info: %+v\n", dnsInfo) jww.TRACE.Printf("DNS Info: %+v\n", dnsInfo)
}, },
GotConn: func(connInfo httptrace.GotConnInfo) { GotConn: func(connInfo httptrace.GotConnInfo) {
jww.DEBUG.Printf("Got Conn: %+v\n", connInfo) jww.TRACE.Printf("Got Conn: %+v\n", connInfo)
}, },
GotFirstResponseByte: func() { GotFirstResponseByte: func() {
jww.DEBUG.Print("Got first byte!") jww.TRACE.Print("Got first byte!")
}, },
} }
...@@ -229,8 +228,7 @@ func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time. ...@@ -229,8 +228,7 @@ func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time.
jww.TRACE.Printf("(GO request): %+v", req) jww.TRACE.Printf("(GO request): %+v", req)
req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace)) req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace))
var resp *http.Response if _, err = client.Do(req); err != nil {
if resp, err = client.Do(req); err != nil {
jww.TRACE.Printf("(GO error): %s", err.Error()) jww.TRACE.Printf("(GO error): %s", err.Error())
if checkErrorExceptions(err) { if checkErrorExceptions(err) {
jww.DEBUG.Printf( jww.DEBUG.Printf(
...@@ -242,7 +240,6 @@ func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time. ...@@ -242,7 +240,6 @@ func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time.
return time.Since(start), false return time.Since(start), false
} }
} }
fmt.Println(resp)
client.CloseIdleConnections() client.CloseIdleConnections()
return time.Since(start), true return time.Since(start), true
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment