mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-17 22:31:26 +02:00
The rate limiter caps new connections (10/min/IP) and game starts (15/min/IP), but one IP could still hold open unbounded sockets by trickling them in under the connection rate and keeping them alive — hoarding spectator slots and server resources ahead of a public launch. Track live sockets per IP in ConnectionHandler and reject new ones past a cap (MAX_SOCKETS_PER_IP, default 10). Slots are freed on disconnect and reconciled against live sockets in the periodic cleanup so a missed disconnect can't wrongly lock out an IP.