Browse Source

auto update script executed

Toby Chui 1 year ago
parent
commit
5b2dbd7ff8
1 changed files with 0 additions and 15 deletions
  1. 0 15
      mod/uptime/uptime.go

+ 0 - 15
mod/uptime/uptime.go

@@ -7,7 +7,6 @@ import (
 	"strings"
 	"time"
 
-	"github.com/go-ping/ping"
 	"imuslab.com/zoraxy/mod/utils"
 )
 
@@ -83,20 +82,6 @@ func (m *Monitor) ExecuteUptimeCheck() {
 		var thisRecord Record
 		if target.Protocol == "http" || target.Protocol == "https" {
 			online, laterncy, statusCode := getWebsiteStatusWithLatency(target.URL)
-			if !online {
-				//Try ICMP ping as well
-				pinger, err := ping.NewPinger(target.URL)
-				if err != nil {
-					log.Println("Unable to start uptime check pinger: " + err.Error())
-				} else {
-					pinger.Count = 2
-					err = pinger.Run()
-					if err != nil {
-						//Unable to ping it. Assume offline
-					}
-				}
-
-			}
 			thisRecord = Record{
 				Timestamp:  time.Now().Unix(),
 				ID:         target.ID,