sendStableMessage(copy);
if(copy != null) sendStableMessage(copy);
    public void up(Event evt) {        Message msg;        StableHeader hdr;        Header obj;        int type=evt.getType();        switch(type) {        case Event.MSG:            msg=(Message)evt.getArg();            if(max_bytes > 0) {  // message counting is enabled                long size=Math.max(msg.getLength(), 24);                num_bytes_received+=size;                if(num_bytes_received >= max_bytes) {                    if(log.isTraceEnabled()) {                        StringBuffer sb=new StringBuffer("max_bytes has been reached (max_bytes=");                        sb.append(max_bytes).append(", number of bytes received=");                        sb.append(num_bytes_received).append("): triggers stable msg");                        log.trace(sb.toString());                    }                    // asks the NAKACK protocol for the current digest, reply event is GET_DIGEST_STABLE_OK (arg=digest)                    passDown(new Event(Event.GET_DIGEST_STABLE));                    num_bytes_received=0;                }            }            hdr=(StableHeader)msg.removeHeader(name);            if(hdr == null)                break;            switch(hdr.type) {            case StableHeader.STABLE_GOSSIP:                handleStableGossip(msg.getSrc(), hdr.stableDigest);                break;            case StableHeader.STABILITY:                handleStabilityMessage(hdr.stableDigest, msg.getSrc());                break;            default:                if(log.isErrorEnabled()) log.error("StableHeader type " + hdr.type + " not known");            }            return;  // don't pass STABLE or STABILITY messages up the stack        case Event.VIEW_CHANGE:            View view=(View)evt.getArg();            handleViewChange(view);            break;        case Event.SET_LOCAL_ADDRESS:            local_addr=(Address)evt.getArg();            break;        case Event.GET_DIGEST_STABLE_OK:            Digest d=(Digest)evt.getArg(), copy;            synchronized(digest) {                updateFromOwnDigest(d);                copy=digest.copy();            }            sendStableMessage(copy);            break;        }        passUp(evt);    }