Implement thread pruning based on bumped_at

This commit is contained in:
Dominic Ferrando
2025-04-21 14:00:10 -04:00
parent 997d65707c
commit 80a0a5eb89
4 changed files with 88 additions and 14 deletions
+6 -4
View File
@@ -17,11 +17,13 @@ var (
var CooldownMutex sync.Mutex
// const POST_COOLDOWN = 15 * time.Second
const POST_COOLDOWN = 0 * time.Second
const POST_COOLDOWN = 15 * time.Second
// const THREAD_COOLDOWN = 2 * time.Minute
const THREAD_COOLDOWN = 0 * time.Minute
// const POST_COOLDOWN = 0 * time.Second
const THREAD_COOLDOWN = 2 * time.Minute
// const THREAD_COOLDOWN = 0 * time.Minute
func IsOnCooldown(ip string, m map[string]time.Time, duration time.Duration) bool {
CooldownMutex.Lock()