while (sel.select() > 0) {
ready_keys=sel.selectedKeys();
for (Iterator it=ready_keys.iterator(); it.hasNext();) {
key=(SelectionKey) it.next();
it.remove(); // remove current entry (why ?)
tmp=(SocketChannel) key.channel();
if (tmp == null) {
log(
"Proxy._handleConnection()",
"attachment is null, continuing");
continue;