Clear Channel.eventLoop on deregistration

This commit is contained in:
Trustin Lee 2012-05-01 23:19:31 +09:00
parent 1356a0b61e
commit e65e496fc0

View File

@ -432,12 +432,20 @@ public abstract class AbstractChannel extends DefaultAttributeMap implements Cha
@Override
public void deregister(final ChannelFuture future) {
if (eventLoop().inEventLoop()) {
try {
doDeregister(future);
} finally {
eventLoop = null;
}
} else {
eventLoop().execute(new Runnable() {
@Override
public void run() {
try {
doDeregister(future);
} finally {
eventLoop = null;
}
}
});
}