310311312313314315316317318319320
{ entry.setException( e ); } finally { key.cancel(); if( !success ) { try { ch.close();
355356357358359360361362363364365
{ ExceptionMonitor.getInstance().exceptionCaught( e ); } finally { key.cancel(); } } } }
600601602603604605606607608609610
while(iter.hasNext()) { SelectionKey k = (SelectionKey) iter.next(); if (k.isValid()&&k.interestOps()==0) { k.cancel(); cancelled++; } } if (cancelled>0) _jvmFix0++;
620621622623624625626627628629630
{ if (++_busyKeyCount>__BUSY_KEY && !(busy.channel() instanceof ServerSocketChannel)) { final SelectChannelEndPoint endpoint = (SelectChannelEndPoint)busy.attachment(); Log.warn("Busy Key "+busy.channel()+" "+endpoint); busy.cancel(); if (endpoint!=null) { dispatch(new Runnable() { public void run()
159160161162163164165166167168169
SelectionKey selectionKey = socketChannel.keyFor(selector); if(selectionKey != null) { try { selectionKey.attach(null); selectionKey.cancel(); } catch(Exception e) { if(logger.isEnabledFor(Level.WARN)) logger.warn(e.getMessage(), e); } }
647648649650651652653654655656657
NioWorker worker = channel.getWorker(); if (worker != null) { Selector selector = worker.selector; SelectionKey key = channel.socket.keyFor(selector); if (key != null) { key.cancel(); } } boolean connected = channel.isConnected(); boolean bound = channel.isBound();
706707708709710711712713714715716
297298299300301302303304305306307
{ entry.setException(e); } finally { key.cancel(); if (!success) { try { ch.close();
344345346347348349350351352353354
{ ExceptionMonitor.getInstance().exceptionCaught(e); } finally { key.cancel(); } } } }
188189190191192193194195196197198
if (key == null) { LOG.error("Trying to modify the registration of a not registered channel"); return; } key.cancel(); key.attach(null); if (IS_DEBUG) { LOG.debug("unregistering : {} done !", listener); }