// look at each key in the selected set
while (it.hasNext()) {
SelectionKey key = it.next();
key.channel().close();
key.attach(null);
key.cancel();
}
}catch ( IOException ignore ){
if (log.isWarnEnabled()) {
log.warn("Unable to cleanup on selector close.",ignore);
}