diff --git a/internal/outpost/ldap/close.go b/internal/outpost/ldap/close.go deleted file mode 100644 index 7fc8989cd..000000000 --- a/internal/outpost/ldap/close.go +++ /dev/null @@ -1,32 +0,0 @@ -package ldap - -import ( - "net" - "time" -) - -func (ls *LDAPServer) Close(boundDN string, conn net.Conn) error { - for _, p := range ls.providers { - p.delayDeleteUserInfo(boundDN) - } - return nil -} - -func (pi *ProviderInstance) delayDeleteUserInfo(dn string) { - ticker := time.NewTicker(30 * time.Second) - quit := make(chan struct{}) - go func() { - for { - select { - case <-ticker.C: - pi.boundUsersMutex.Lock() - delete(pi.boundUsers, dn) - pi.boundUsersMutex.Unlock() - close(quit) - case <-quit: - ticker.Stop() - return - } - } - }() -} diff --git a/internal/outpost/ldap/ldap.go b/internal/outpost/ldap/ldap.go index 96d2df84d..b37dc1893 100644 --- a/internal/outpost/ldap/ldap.go +++ b/internal/outpost/ldap/ldap.go @@ -40,7 +40,6 @@ func NewServer(ac *ak.APIController) *LDAPServer { ls.defaultCert = &defaultCert s.BindFunc("", ls) s.SearchFunc("", ls) - s.CloseFunc("", ls) return ls }