From 9c81516139819b4bb4db7617643bf2705404ae5c Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 25 Jun 2021 15:00:39 +1000 Subject: [PATCH] Check that udp conn ID age is non-zero --- tracker/udp/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracker/udp/client.go b/tracker/udp/client.go index 70df469f..59714c09 100644 --- a/tracker/udp/client.go +++ b/tracker/udp/client.go @@ -66,7 +66,7 @@ func (cl *Client) Scrape( } func (cl *Client) connect(ctx context.Context) (err error) { - if time.Since(cl.connIdIssued) < time.Minute { + if !cl.connIdIssued.IsZero() && time.Since(cl.connIdIssued) < time.Minute { return nil } respBody, err := cl.request(ctx, ActionConnect, nil) -- 2.48.1