diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2016-07-31 18:29:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-31 18:29:22 +0300 |
commit | 7bb9502d23f78945a958ade4d52b9aa6e85897b0 (patch) | |
tree | c09f053f8946d330d9444a5cad4025366e0de122 /apps/user_ldap/ajax | |
parent | eecec95f7e3c5980a0b71f9eb41efe6b6b3ef08b (diff) | |
parent | 12442f32705b13bfbb551c1a010002578d4f3ff8 (diff) |
Merge pull request #595 from nextcloud/fix_slow_test
Close session fast when doing a test to prevent blocking the next requests
Diffstat (limited to 'apps/user_ldap/ajax')
-rw-r--r-- | apps/user_ldap/ajax/testConfiguration.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/user_ldap/ajax/testConfiguration.php b/apps/user_ldap/ajax/testConfiguration.php index 6581e8453bd..f73e11d3e21 100644 --- a/apps/user_ldap/ajax/testConfiguration.php +++ b/apps/user_ldap/ajax/testConfiguration.php @@ -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()) { /* |