Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web/job
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-03-04 15:05:29 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-03-04 15:05:29 +0300
commit57409964369a239093998a98fba9167c198db01c (patch)
treead28dc064b6f6cb99164491f3cac46662e386a77 /web/job
parent874aae8080b587877ef3cf7d0048f79e09fb7233 (diff)
update dependencies
Diffstat (limited to 'web/job')
-rw-r--r--web/job/ldap_sync_job.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/web/job/ldap_sync_job.go b/web/job/ldap_sync_job.go
index a947eb73..7edb8178 100644
--- a/web/job/ldap_sync_job.go
+++ b/web/job/ldap_sync_job.go
@@ -271,10 +271,7 @@ func (j *LdapSyncJob) deleteClientsNotInLDAP(inboundTag string, ldapEmails map[s
// Delete in batches
for i := 0; i < len(toDelete); i += batchSize {
- end := i + batchSize
- if end > len(toDelete) {
- end = len(toDelete)
- }
+ end := min(i+batchSize, len(toDelete))
batch := toDelete[i:end]
for _, c := range batch {