Close session fast when doing a test to prevent blocking the next

requests
This commit is contained in:
Juan Pablo Villafáñez 2016-06-23 14:47:20 +02:00 committed by Bjoern Schiessle
parent 318d68a9a9
commit 12442f3270
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
1 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,13 @@ $_POST['ldap_configuration_active'] = 1;
try {
if ($connection->setConfiguration($_POST)) {
/*
* Clossing the session since it won't be used from this point on. There might be a potential
* race condition if a second request is made: either this request or the other might not
* contact the LDAP backup server the first time when it should, but there shouldn't be any
* problem with that other than the extra connection.
*/
\OC::$server->getSession()->close();
//Configuration is okay
if ($connection->bind()) {
/*