diff --git a/cmd/dynafire/main.go b/cmd/dynafire/main.go index 31af7d8..c50fa96 100644 --- a/cmd/dynafire/main.go +++ b/cmd/dynafire/main.go @@ -6,6 +6,7 @@ import ( "log/slog" "os" "sync" + "time" "github.com/MatejLach/dynafire/firewall/firewalld" "github.com/MatejLach/dynafire/provider/turris" @@ -91,6 +92,7 @@ func main() { slog.Debug("whitelisting", "IP", deltaMsg.IP.String()) } + time.Sleep(250 * time.Millisecond) <-sem } }() diff --git a/provider/turris/turris.go b/provider/turris/turris.go index 3f44c6d..07d47ec 100644 --- a/provider/turris/turris.go +++ b/provider/turris/turris.go @@ -144,6 +144,7 @@ func (c *Client) RequestMessages(ctx context.Context) { if !serialOk(previousDeltaSerial, dRes.Serial) { refreshList = true previousDeltaSerial = 0 + continue } previousDeltaSerial = dRes.Serial