Log connect error only in wavefront output (#3549)
(cherry picked from commit 177e7e2c73
)
This commit is contained in:
parent
0438f412a9
commit
558ce25c94
|
@ -101,11 +101,13 @@ func (w *Wavefront) Connect() error {
|
||||||
uri := fmt.Sprintf("%s:%d", w.Host, w.Port)
|
uri := fmt.Sprintf("%s:%d", w.Host, w.Port)
|
||||||
_, err := net.ResolveTCPAddr("tcp", uri)
|
_, err := net.ResolveTCPAddr("tcp", uri)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Wavefront: TCP address cannot be resolved %s", err.Error())
|
log.Printf("Wavefront: TCP address cannot be resolved %s", err.Error())
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
connection, err := net.Dial("tcp", uri)
|
connection, err := net.Dial("tcp", uri)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Wavefront: TCP connect fail %s", err.Error())
|
log.Printf("Wavefront: TCP connect fail %s", err.Error())
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
defer connection.Close()
|
defer connection.Close()
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue