mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-06-29 14:31:11 +02:00
APIthrottle->autoBan
This commit is contained in:
@@ -1004,6 +1004,8 @@ def api_throttle(node_id, rxInterface=None, channel=None, apiName=""):
|
||||
node_entry['lastSeen'] = current_time
|
||||
if node_entry['api_throttle_count'] > apiThrottleValue:
|
||||
logger.warning(f"System: Node {node_id_str} throttled on API {apiName} count: {node_entry['api_throttle_count']}")
|
||||
if autoBanEnabled:
|
||||
ban_hammer(node_id_str, reason="API Throttle Exceeded")
|
||||
return "🚦 System busy, try again later."
|
||||
else:
|
||||
# node not found, create a new entry
|
||||
|
||||
Reference in New Issue
Block a user