diff --git a/lg.go b/lg.go index cc5e884..f51cdf3 100644 --- a/lg.go +++ b/lg.go @@ -40,11 +40,13 @@ func (p *Prefix) checkLGState() { resp, err := http.Get(url) if err != nil { log.Error().Err(err).Msg("Fetching ripestat") + return } body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Error().Err(err).Msg("reading ripestat resp") + return } defer resp.Body.Close() @@ -55,6 +57,7 @@ func (p *Prefix) checkLGState() { log.Error().Int("status code", statusCode). Str("status", ripeStatLookingGlassResp.Status). Msg("ripestat(lg) resp status code != 200") + return } availableStr := "y" diff --git a/vis.go b/vis.go index 0f6cd68..4921921 100644 --- a/vis.go +++ b/vis.go @@ -25,11 +25,13 @@ func (p *Prefix) checkVisState() { resp, err := http.Get(url) if err != nil { log.Error().Err(err).Msg("Fetching ripestat") + return } body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Error().Err(err).Msg("reading ripestat resp") + return } defer resp.Body.Close() @@ -40,6 +42,7 @@ func (p *Prefix) checkVisState() { log.Error().Int("status code", statusCode). Str("status", ripeStatVisibilityResp.Status). Msg("ripestat(vis) resp status code != 200") + return } ipv6 := strings.Contains(p.prefix, ":")