]> source.dussan.org Git - nextcloud-server.git/commitdiff
Close session fast when doing a test to prevent blocking the next 595/head
authorJuan Pablo Villafáñez <jvillafanez@solidgear.es>
Thu, 23 Jun 2016 12:47:20 +0000 (14:47 +0200)
committerBjoern Schiessle <bjoern@schiessle.org>
Wed, 27 Jul 2016 09:41:34 +0000 (11:41 +0200)
requests

apps/user_ldap/ajax/testConfiguration.php

index 6581e8453bd10cfd1920c3129270cb74b5fd57a0..f73e11d3e215d54dd7b70f42599135adb5caeb28 100644 (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()) {
                        /*