From ee1767d1474aaf116193888cdf516d2ce531ff2e Mon Sep 17 00:00:00 2001 From: Ruel Tmeizeh - RuhNet Date: Fri, 8 Nov 2024 20:05:29 -0500 Subject: [PATCH] Release version. --- amqp.go | 1 - cache.go | 9 +++------ main.go | 8 +++++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/amqp.go b/amqp.go index 8035e06..58cd7d8 100644 --- a/amqp.go +++ b/amqp.go @@ -227,7 +227,6 @@ func publisher_loop() { } // block thread - for { select { case sig := <-sigch: diff --git a/cache.go b/cache.go index 3d6975c..90a84c7 100644 --- a/cache.go +++ b/cache.go @@ -3,7 +3,6 @@ package main import ( "sync" "time" - ) // item represents a cache item with a value and an expiration time. @@ -28,19 +27,17 @@ func NewTTL(s int64, callbackFunc func(ipaddr, portstring string) error) *TTLCac items: make(map[string]item), } - go func() { for range time.Tick(time.Duration(int64(s/4)) * time.Second) { c.mu.Lock() - // Iterate over the cache ad delete expired ones. for key, item := range c.items { if item.isExpired() { - logit(7,"Deleting expired cache item: "+key) + logit(7, "Deleting expired cache item: "+key) delete(c.items, key) - //_ = callbackFunc(key, "") - go callbackFunc(key, "") + //_ = callbackFunc(key, "") + go callbackFunc(key, "") } } diff --git a/main.go b/main.go index 8c257ed..cc45e86 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,9 @@ //////////////////////////////////////////////////////////////////////// -// KazooFirewallAgent (c) 2024-, RuhNet +// KazooFirewallAgent (c) 2024, RuhNet, All Rights Reserved // Author: Ruel Tmeizeh, RuhNet www.ruhnet.co -// License: GPL v3 https://www.gnu.org/licenses/gpl-3.0.txt +// Public License: GPL v3 https://www.gnu.org/licenses/gpl-3.0.txt +// Dual-Licensed to PBX.com LLC under a non-exclusive unlimited +// most-rights-granted use/deployment/transfer/modification license. //////////////////////////////////////////////////////////////////////// package main @@ -19,7 +21,7 @@ import ( const appnameFull string = "RuhNet Kazoo Firewall Agent" const appname string = "kazoo_firewall_agent" -const version string = "0.9" +const version string = "1.0" const serverVersion string = "RuhNet " + appname + " v" + version const website string = "https://ruhnet.co"