public void fireExceptionCaught(IoSession session, Throwable cause) { // Notify the related ConnectFuture // if the session is created from SocketConnector. ConnectFuture future = (ConnectFuture) session .removeAttribute(CONNECT_FUTURE); if (future == null) { Entry head = this.head; callNextExceptionCaught(head, session, cause); } else { // Please note that this place is not the only place that // calls ConnectFuture.setException(). future.setException(cause); } }