Fix a bug where SingleThreadEventExecutor sets its internal state flag too early during termination

This commit is contained in:
Trustin Lee 2013-05-01 16:56:34 +09:00
parent 2e0dd65250
commit bc96c4b7b3

View File

@ -135,13 +135,13 @@ public abstract class SingleThreadEventExecutor extends AbstractEventExecutor {
break;
}
}
synchronized (stateLock) {
state = ST_TERMINATED;
}
} finally {
try {
cleanup();
} finally {
synchronized (stateLock) {
state = ST_TERMINATED;
}
threadLock.release();
if (!taskQueue.isEmpty()) {
logger.warn(