Skip to content

Report a bug on routing/DecisionEngineRouter.java #1

@sparkandshine

Description

@sparkandshine

After carefully debugging, a bug is found on the-one-pitt/routing/DecisionEngineRouter.java where it lacks of one line m.setTtl(this.msgTtl);, seeing below.

    @Override
    public boolean createNewMessage(Message m)
    {
        if(decider.newMessage(m))
        {
            if(m.getId().equals("M14"))
                System.out.println("Host: " + getHost() + "Creating M14");
            makeRoomForNewMessage(m.getSize());

            m.setTtl(this.msgTtl);  //added by SparkandShine

            addToMessages(m, true);

            findConnectionsForNewMessage(m, getHost());
            return true;
        }
        return false;
    }

Otherwise, no matter what Group.msgTtl is, the time-to-live of messages is always -1, i.e., INFINITE_TTL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions