Author: ron.sigal(a)jboss.com
Date: 2009-09-02 15:28:11 -0400 (Wed, 02 Sep 2009)
New Revision: 5432
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
Log:
JBREM-1107: Fixed IdleTimeoutTask so that it won't kill a ServerThread in the middle
of an invocation.
Modified:
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java
===================================================================
---
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2009-09-02
17:23:54 UTC (rev 5431)
+++
remoting2/branches/2.2/src/main/org/jboss/remoting/transport/socket/SocketServerInvoker.java 2009-09-02
19:28:11 UTC (rev 5432)
@@ -798,9 +798,11 @@
{
log.trace("Idle timeout reached for ServerThread (" +
svrThread + ") and will be evicted.");
}
- clientpool.remove(svrThread);
+ synchronized (clientpool)
+ {
+ clientpool.remove(svrThread);
+ }
svrThread.shutdown();
- svrThread.unblock();
}
}
}
@@ -845,7 +847,10 @@
{
log.trace("Idle timeout reached for ServerThread (" +
svrThread + ") and will be removed from thread pool.");
}
- threadpool.remove(svrThread);
+ synchronized(threadpool)
+ {
+ threadpool.remove(svrThread);
+ }
svrThread.shutdown();
}
}