Skip to content

Commit

Permalink
Simplify code using deconstruction. (#1533)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangxiren authored May 20, 2024
1 parent 18ffd18 commit 5a6aa8e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/DotNetCore.CAP/Internal/IMessageSender.Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ public async Task<OperateResult> SendAsync(MediumMessage message)
OperateResult result;
do
{
var executedResult = await SendWithoutRetryAsync(message).ConfigureAwait(false);
result = executedResult.Item2;
(retry, result) = await SendWithoutRetryAsync(message).ConfigureAwait(false);
if (result.Equals(OperateResult.Success)) return result;
retry = executedResult.Item1;
} while (retry);

return result;
Expand Down

0 comments on commit 5a6aa8e

Please sign in to comment.