From 4ffebab2c4598f868f1448b562b143a8c475ef5f Mon Sep 17 00:00:00 2001 From: Patrick Seeburger Date: Wed, 19 Sep 2018 11:21:35 +0200 Subject: [PATCH] Fixed race condition between main() and InstallRateLimitReset(). --- birdwatcher.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/birdwatcher.go b/birdwatcher.go index bb6d7ca..8f4de3f 100644 --- a/birdwatcher.go +++ b/birdwatcher.go @@ -156,7 +156,9 @@ func main() { // Configuration bird.ClientConf = birdConf bird.StatusConf = conf.Status + bird.RateLimitConf.Lock() bird.RateLimitConf.Conf = conf.Ratelimit + bird.RateLimitConf.Unlock() bird.ParserConf = conf.Parser endpoints.Conf = conf.Server