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

revert connect change

parent ef5f24bd
No related branches found
No related tags found
2 merge requests!61Hotfix/fix is online,!39Merge release into master
...@@ -188,17 +188,10 @@ func (wc *webConn) isAlive() bool { ...@@ -188,17 +188,10 @@ func (wc *webConn) isAlive() bool {
// IsOnline sends an empty http get request to verify the status of the server // IsOnline sends an empty http get request to verify the status of the server
func (wc *webConn) IsOnline() (time.Duration, bool) { func (wc *webConn) IsOnline() (time.Duration, bool) {
start := time.Now() addr := wc.h.GetAddress()
err := wc.Connect() pingTimeout := wc.h.params.PingTimeout
if err != nil {
jww.WARN.Printf("[IsOnline] Could not connect: %+v", err) return wc.isOnlineHelper(addr, pingTimeout)
return time.Since(start), false
}
return time.Since(start), true
//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) { func (wc *webConn) isOnlineHelper(addr string, pingTimeout time.Duration) (time.Duration, bool) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment