Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report a bug on routing/DecisionEngineRouter.java #1

Open
sparkandshine opened this issue Jun 2, 2015 · 1 comment
Open

Report a bug on routing/DecisionEngineRouter.java #1

sparkandshine opened this issue Jun 2, 2015 · 1 comment

Comments

@sparkandshine
Copy link

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.

@julianofischer
Copy link
Contributor

You are right @sparkandshine.
+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants