From 140016ab0773c6e6f2bb5cfb782d7dde66094011 Mon Sep 17 00:00:00 2001 From: jbhusson <jonah@elixxir.io> Date: Fri, 6 Jan 2023 12:21:12 -0500 Subject: [PATCH] revert connect change --- connect/webConn.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/connect/webConn.go b/connect/webConn.go index ec208f8..2781e29 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) { -- GitLab