add debugs

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-07-13 18:44:07 -04:00
parent b28cc1111f
commit 049ac1b077
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3

View File

@ -211,10 +211,12 @@ func scanIP(ip string, port int) {
func portOpen(ip string, port int) bool { func portOpen(ip string, port int) bool {
c, err := net.DialTimeout("tcp", fmt.Sprintf("%s:%d", ip, port), timeoutPing) c, err := net.DialTimeout("tcp", fmt.Sprintf("%s:%d", ip, port), timeoutPing)
if err != nil { if err != nil {
// logrus.Warnf("listen at %s:%s failed: %v", ip, port, err) logrus.Debugf("listen at %s:%s failed: %v", ip, port, err)
return false return false
} }
defer c.Close() if c != nil {
c.Close()
}
return true return true
} }
@ -247,7 +249,7 @@ func isKubernetesDashboard(ip string, port int) (bool, string) {
resp, err = client.Get(uri) resp, err = client.Get(uri)
} }
if err != nil { if err != nil {
//logrus.Warnf("getting %s:%s failed: %v", ip, port, err) logrus.Debugf("getting %s:%s failed: %v", ip, port, err)
return false, "" return false, ""
} }
defer resp.Body.Close() defer resp.Body.Close()