GUACAMOLE-234: Don't close the connection after bind.

This commit is contained in:
Nick Couchman
2018-12-15 14:11:53 -05:00
committed by Virtually Nick
parent d7d622051f
commit fc5c4c538e

View File

@@ -156,14 +156,12 @@ public class LDAPConnectionService {
// Disconnect if an error occurs during bind
catch (LdapException e) {
logger.debug("Unable to bind to LDAP server.", e);
disconnect(ldapConnection);
throw new GuacamoleInvalidCredentialsException(
"Unable to bind to the LDAP server.",
CredentialsInfo.USERNAME_PASSWORD);
}
finally {
disconnect(ldapConnection);
}
return ldapConnection;
}