Skip to content

Commit

Permalink
Merge pull request #285 from stuartwdouglas/result-prod
Browse files Browse the repository at this point in the history
EJBCLIENT-243 Make sure only the first result is taken into account.
  • Loading branch information
dmlloyd authored Jul 5, 2017
2 parents 977dcf6 + 91b6216 commit 211201a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ public void discardResult() throws IllegalStateException {
void resultReady(EJBReceiverInvocationContext.ResultProducer resultProducer) {
Assert.checkNotNullParam("resultProducer", resultProducer);
synchronized (lock) {
if (state.isWaiting()) {
if (state.isWaiting() && this.resultProducer == null) {
this.resultProducer = resultProducer;
if (state == State.WAITING) {
transition(State.READY);
Expand All @@ -649,7 +649,6 @@ void resultReady(EJBReceiverInvocationContext.ResultProducer resultProducer) {
}
// for whatever reason, we don't care
resultProducer.discardResult();
return;
}

/**
Expand Down

0 comments on commit 211201a

Please sign in to comment.