src/java.naming/share/classes/com/sun/jndi/ldap/LdapClient.java
Print this page
@@ -490,11 +490,11 @@
* Called by Connection.cleanup(). LdapClient should
* notify any unsolicited listeners and removing itself from any pool.
* This is almost like forceClose(), except it doesn't call
* Connection.cleanup() (because this is called from cleanup()).
*/
- void processConnectionClosure() {
+ synchronized void processConnectionClosure() {
// Notify listeners
synchronized (unsolicited) {
if (unsolicited.size() > 0) {
String msg;
if (conn != null) {
@@ -1497,17 +1497,12 @@
void removeUnsolicited(LdapCtx ctx) {
if (debug > 0) {
System.err.println("LdapClient.removeUnsolicited" + ctx);
}
- synchronized (unsolicited) {
- if (unsolicited.size() == 0) {
- return;
- }
unsolicited.removeElement(ctx);
}
- }
// NOTE: Cannot be synchronized because this is called asynchronously
// by the reader thread in Connection. Instead, sync on 'unsolicited' Vector.
void processUnsolicited(BerDecoder ber) {
if (debug > 0) {