From 79a27dbc4b8b45f1de6920a06d7609f8a2985d9b Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Sun, 1 Nov 2020 01:00:51 -0500 Subject: [PATCH] Deleted dead code --- poll/engine.go | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/poll/engine.go b/poll/engine.go index cc7806a..bfb8fe8 100644 --- a/poll/engine.go +++ b/poll/engine.go @@ -254,37 +254,6 @@ func StartInstancePoll(instancereport InstanceReport, reportPostChan chan Report instanceReportChan <- InstanceReport{instancereport.endpoint, resp.StatusCode, min_id, numposts} } -/* -func StartGetPeers(endpoint string, instanceReportChan chan InstanceReport) { - var newpeers []string - - api_peers := "https://" + endpoint + "/api/v1/instance/peers" - resp, err := http.Get(api_peers) - if err != nil { - instanceReportChan <- InstanceReport{endpoint, NO_CONNECTION, "", 0} - return -// os.Exit(1) - } - - body, err := ioutil.ReadAll(resp.Body) - - err = json.Unmarshal([]byte(body), &newpeers) - if err != nil { - fmt.Println("Unmarshal 1"); - log.Fatal(err) - instanceReportChan <- InstanceReport{endpoint, endpoint, UNMARSHAL_ERROR, "", 0} - return - } - - for _, newpeer := range newpeers { - var q InstanceReport - q.endpoint = newpeer - q.status = NEW_INSTANCE - instanceReportChan <- q - } -} -*/ - func DeferPollRun(instancereport InstanceReport, runninginstances *[]RunningInstance, instanceReportChan chan InstanceReport, reportPostChan chan ReportPost) { delay := 10 @@ -356,8 +325,6 @@ func NewInstance(endpoint string, runninginstances *[]RunningInstance, instanceR newinstancereport.min_id = "" newinstancereport.numposts = 0 go StartInstancePoll(newinstancereport, reportPostChan, instanceReportChan) -// fmt.Println("Temporarily disabled Peer Hunting") -// go StartGetPeers(endpoint, instanceReportChan) } }