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: don't throw if the promise got completed in the meanwhile #1580

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -172,7 +172,7 @@ private final class AkkaNettyGrpcClientGraphStage[I, O](
call = null
}
if (!matVal.isCompleted) {
matVal.failure(new AbruptStageTerminationException(this))
matVal.tryFailure(new AbruptStageTerminationException(this))
Copy link
Member

Choose a reason for hiding this comment

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

I guess we can remove the matVal.isCompleted check now, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm.. 🤔
Does it make sense to try if we know it's completed?

On the other hand removing the check would reduce the LOC, so I can do that if you want. 👍
Should I?

Copy link
Member

Choose a reason for hiding this comment

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

A matter of taste I suppose - let's leave it like this 👍

}
}

Expand Down