Skip to content

Commit f1c311c

Browse files
jvillafanezVincent Petry
authored andcommitted
Close session fast when doing a test to prevent blocking the next
requests
1 parent ac26b8b commit f1c311c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/user_ldap/ajax/testConfiguration.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838

3939
try {
4040
if ($connection->setConfiguration($_POST)) {
41+
/*
42+
* Clossing the session since it won't be used from this point on. There might be a potential
43+
* race condition if a second request is made: either this request or the other might not
44+
* contact the LDAP backup server the first time when it should, but there shouldn't be any
45+
* problem with that other than the extra connection.
46+
*/
47+
\OC::$server->getSession()->close();
4148
//Configuration is okay
4249
if ($connection->bind()) {
4350
/*

0 commit comments

Comments
 (0)