Browse Source

Release version.

master
Ruel Tmeizeh - RuhNet 1 year ago
parent
commit
ee1767d147
3 changed files with 8 additions and 10 deletions
  1. +0
    -1
      amqp.go
  2. +3
    -6
      cache.go
  3. +5
    -3
      main.go

+ 0
- 1
amqp.go View File

@ -227,7 +227,6 @@ func publisher_loop() {
}
// block thread
for {
select {
case sig := <-sigch:


+ 3
- 6
cache.go View File

@ -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, "")
}
}


+ 5
- 3
main.go View File

@ -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"


Loading…
Cancel
Save