mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-25 20:15:01 +03:00
8fb6418c77
The IP-limit job asks every 10 seconds whether any client carries an IP limit. The probe was a COUNT with LIMIT 1, and the limit applies to the one-row aggregate, so the database still read the whole clients table on every run. Ask with SELECT EXISTS instead, so the scan stops at the first client with limit_ip > 0. The predicate and the fail-to-false behaviour are unchanged; the probe test now also runs in the PostgreSQL scanner suite. Closes #7199