mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache LDAP connections: MDL-18130 Properly handle open LDAP connections.
Both CAS and LDAP auth plugins open new connections to the LDAP server to get the user account details. While this is the desired behaviour for regular logins (we probably don't have an already open connection to the LDAP server), this is a ressource hog when we are doing user synchronization, as the closed connections remain in the TCP_WAIT state for a while before the server can reuse them. If we are syncing a lot of users, we can make the server run out of available TCP ressources. So we cache the connection the first time we establish it and return the same connection handle everytime, unless we've closed all the 'open' connections, or the auth object is destroyed. In addition to that, there were a few missing calls to ldap_close().
- Loading branch information
iarenaza
committed
Feb 15, 2009
1 parent
a33b386
commit b743169
Showing
2 changed files
with
69 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters