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

Fixes Restcomm#150 : Resubmissions of requests to alternate peers now possible until all peers exhausted, while respecting Weighted Round Robin balancing algorithm #156

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -1060,10 +1060,9 @@ public boolean receiveMessage(IMessage message) {
if (isRedirectAnswer(avpResCode, message)) {
message.setListener(request.getEventListener());
message = processRedirectAnswer(request, message);
//if return value is not null, there was some error, lets try to invoke listener if it exists...
// if return value is not null, there was some error, lets try to invoke listener if it exists...
isProcessed = message == null;
}
avpResCode = message.getAvps().getAvp(RESULT_CODE);
Copy link
Author

Choose a reason for hiding this comment

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

I'm wondering now whether, because if a redirect was processed, the message (i.e. Answer) could possibly be a different message to when avpResCode was originally assigned its value, this assignment statement should be added again, to ensure the avpResCode contains the most recent value, and this particular change reverted?

Copy link
Author

Choose a reason for hiding this comment

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

Reverted

if (isBusyOrUnableToDeliverAnswer(avpResCode, message)) {
message = processBusyOrUnableToDeliverAnswer(request, message);
// if return value is not null, there was some error, lets try to invoke listener if it exists...
Expand Down