Author: david.lloyd(a)jboss.com
Date: 2008-07-18 21:08:00 -0400 (Fri, 18 Jul 2008)
New Revision: 4405
Modified:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
Log:
Fix spurious wakeups
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
===================================================================
---
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-07-19
00:56:37 UTC (rev 4404)
+++
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-07-19
01:08:00 UTC (rev 4405)
@@ -177,10 +177,12 @@
private final class ResourceRemover implements CloseHandler<Closeable> {
public void handleClose(final Closeable closed) {
- resources.remove(closed);
synchronized (resources)
{
- resources.notifyAll();
+ resources.remove(closed);
+ if (resources.isEmpty()) {
+ resources.notifyAll();
+ }
}
}
}
Show replies by date