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

Do all messages require TimeoutIds? #4

Open
o-alex opened this issue Aug 26, 2014 · 1 comment
Open

Do all messages require TimeoutIds? #4

o-alex opened this issue Aug 26, 2014 · 1 comment

Comments

@o-alex
Copy link
Collaborator

o-alex commented Aug 26, 2014

It seems to be hardcoded that all message require a TimeoutId:
in DiectMsgNettyFactory - Request 0 line 88
this constructor is always called be decoding code which hardcodes the timeoutid boolean to true for both Request and Response, which means the decoding code always wants to read a timeoutId

However, the encoding code in DirectMsgNetty - writeHeader method, line 74 checks if the message has a timeout defined. If it does it writes it and everything works correct. If the message does not have a timeout it will not write anything, effectively jumping over it. The encoding succeds(with no timeout written) - but if we try to decode this it will fail as it will actually try to read a timeout.
Should the encoding fail if no timeout present or should we write a marker flag to mark the existence or absence of a timeout

@jimdowling
Copy link
Owner

For Request/Response, you have to have a TimeoutId. For a OneWay msg, there is no TimeoutId. Line 74 is for OneWay msgs.

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