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

fix(disposition): only send disposition to relevant links by role #134

Merged
merged 1 commit into from
Jul 29, 2015

Conversation

mbroadst
Copy link
Collaborator

Previously we ignored the role of the incoming disposition frame,
and forwarded these frames to the _dispositionRecieved method of
all links we knew about. This patch corrects this behavior, and
includes an integration test verifying that frames are forwarded
to the appropriate link types.

});
var dispositionHandler = function(l) { l._dispositionReceived(disposition); };
if (frame.role === constants.linkRole.sender) {
this._senderLinks.forEach(dispositionHandler);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually reversed - the "role" is the role of the one sending you the dispo frame (so e.g. "I'm a receiver, and I'm sending this dispo frame to the sender").

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, indeed you are correct. The spec is very mysterious in their wording here, but it should have been obvious from the test that the sender should be the one receiving dispositions!

Previously we ignored the role of the incoming disposition frame,
and forwarded these frames to the _dispositionRecieved method of
all links we knew about. This patch corrects this behavior, and
includes an integration test verifying that frames are forwarded
to the appropriate link types.
noodlefrenzy added a commit that referenced this pull request Jul 29, 2015
fix(disposition): only send disposition to relevant links by role
@noodlefrenzy noodlefrenzy merged commit 41523db into master Jul 29, 2015
@mbroadst mbroadst deleted the disposition-roles branch July 31, 2015 12:33
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

Successfully merging this pull request may close these issues.

2 participants