diff --git a/connect/webConn.go b/connect/webConn.go index ec208f863b2af556cb87c09d498fa49ae7dddca2..2781e29799fdfed26406921aefe4a07611f5808f 100644 --- a/connect/webConn.go +++ b/connect/webConn.go @@ -188,17 +188,10 @@ func (wc *webConn) isAlive() bool { // IsOnline sends an empty http get request to verify the status of the server func (wc *webConn) IsOnline() (time.Duration, bool) { - start := time.Now() - err := wc.Connect() - if err != nil { - jww.WARN.Printf("[IsOnline] Could not connect: %+v", err) - return time.Since(start), false - } - return time.Since(start), true - //addr := wc.h.GetAddress() - //pingTimeout := wc.h.params.PingTimeout - // - //return wc.isOnlineHelper(addr, pingTimeout) + addr := wc.h.GetAddress() + pingTimeout := wc.h.params.PingTimeout + + return wc.isOnlineHelper(addr, pingTimeout) } func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time.Duration, bool) {