mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-19 11:34:59 +03:00
fix(ldap): keep trusted baseline after rejected fetch (#6936)
The auto-delete retention guard refused a partial directory result for one tick, but still stored it as the next baseline, so the following tick detached clients that were still in LDAP. A refused fetch now leaves the baseline unchanged. Closes #6935.
This commit is contained in:
@@ -24,7 +24,7 @@ func TestAutoDeleteAllowed(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
j := NewLdapSyncJob()
|
||||
j.lastFlagCount.Store(c.previous)
|
||||
j.lastTrustedFlagCount.Store(c.previous)
|
||||
if got := j.autoDeleteSafeForFetch(c.fetched); got != c.want {
|
||||
t.Fatalf("autoDeleteSafeForFetch(previous=%d, fetched=%d) = %v, want %v",
|
||||
c.previous, c.fetched, got, c.want)
|
||||
|
||||
Reference in New Issue
Block a user