GUACAMOLE-936: Each LdapNetworkConnection must be closed or threads are leaked, causing Tomcat to fail to shutdown.

This commit is contained in:
Michael Jumper
2020-01-22 21:57:06 -08:00
parent 09b2400d89
commit 00327706b0

View File

@@ -204,6 +204,7 @@ public class AuthenticationProviderService {
// Attempt bind
LdapNetworkConnection ldapConnection = ldapService.bindAs(bindDn, password);
try {
// Retrieve group membership of the user that just authenticated
Set<String> effectiveGroups =
@@ -219,6 +220,13 @@ public class AuthenticationProviderService {
}
// Always disconnect
finally {
ldapService.disconnect(ldapConnection);
}
}
/**
* Returns parameter tokens generated from LDAP attributes on the user
* currently bound under the given LDAP connection. The attributes to be