finally { closed=false; connected=false;
catch(Throwable t) { log.error("disconnecting channel failed", t);
    public synchronized void disconnect() {        try {            factory.disconnect(this);        }        finally {            closed=false;            connected=false;        }        notifyChannelDisconnected(this);    }