CS-16594: when request is cancelled by the remote peer, in addition to cancelling the request, unblock the agent queue if the request is the current request

This commit is contained in:
Alena Prokharchyk 2012-10-24 10:43:44 -07:00
parent a5077968db
commit efb5f85aad
1 changed files with 6 additions and 0 deletions

View File

@ -581,6 +581,12 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
logD(data, "Cancel request received");
}
agent.cancel(cancel.getSequence());
final Long current = agent._currentSequence;
//if the request is the current request, always have to trigger sending next request in sequence,
//otherwise the agent queue will be blocked
if (req.executeInSequence() && (current != null && current == Request.getSequence(data))) {
agent.sendNext(Request.getSequence(data));
}
return;
}