Check before casting

This commit is contained in:
norman 2012-03-30 14:29:26 +02:00
parent a85f22e173
commit c3e51af849

View File

@ -136,7 +136,9 @@ public class NioWorker extends AbstractNioWorker {
setInterestOps(channel, future, channel.getRawInterestOps());
}
if (future != null) {
((NioSocketChannel) channel).setConnected();
if (channel instanceof NioSocketChannel) {
((NioSocketChannel) channel).setConnected();
}
future.setSuccess();
}