526527528529530531532533534535536
ExceptionMonitor.getInstance().exceptionCaught(e); } getListeners().fireSessionDestroyed(session); session.getCloseFuture().setClosed(); key.cancel(); selector.wakeup(); // wake up again to trigger thread death } } }
159160161162163164165166167168169
if (!key.isValid()) { continue; } try { key.cancel(); ch.close(); } catch (IOException e) { session.getFilterChain().fireExceptionCaught(session, e); } finally { releaseWriteBuffers(session);
404405406407408409410411412413414
"Address not bound: " + request.address); } else { SelectionKey key = ssc.keyFor(selector); request.registrationRequest = (RegistrationRequest) key .attachment(); key.cancel(); selector.wakeup(); // wake up again to trigger thread death ssc.close(); }
547548549550551552553554555556557
"Address not bound: " + request.address); } else { SelectionKey key = ch.keyFor(selector); request.registrationRequest = (RegistrationRequest) key .attachment(); key.cancel(); selector.wakeup(); // wake up again to trigger thread death ch.disconnect(); ch.close(); } } catch (Throwable t) {
268269270271272273274275276277278
if (sk.isValid()) { sk.interestOps(sk.interestOps() & (~ops)); if (SelectionKey.OP_WRITE==(ops&SelectionKey.OP_WRITE)) countDown(key.getWriteLatch()); if (SelectionKey.OP_READ==(ops&SelectionKey.OP_READ))countDown(key.getReadLatch()); if (sk.interestOps()==0) { sk.cancel(); sk.attach(null); } }else { sk.cancel(); sk.attach(null);
272273274275276277278279280281282
if (sk.interestOps()==0) { sk.cancel(); sk.attach(null); } }else { sk.cancel(); sk.attach(null); } } }catch (CancelledKeyException cx) { if (sk!=null) {
278279280281282283284285286287288
sk.attach(null); } } }catch (CancelledKeyException cx) { if (sk!=null) { sk.cancel(); sk.attach(null); } } } };
347348349350351352353354355356357
} if (sk.isWritable()) { countDown(attachment.getWriteLatch()); } }catch (CancelledKeyException ckx) { if (sk!=null) sk.cancel(); countDown(attachment.getReadLatch()); countDown(attachment.getWriteLatch()); } }//while }catch ( Throwable t ) {
207208209210211212213214215216217
continue; } try { key.cancel(); ch.close(); } catch( IOException e ) { session.getManagerFilterChain().exceptionCaught( session, e );
517518519520521522523524525526527
catch( IOException e ) { exceptionMonitor.exceptionCaught( this, e ); } session.notifyClose(); key.cancel(); selector.wakeup(); // wake up again to trigger thread death } } }