Skip to content

Commit

Permalink
Remove now unnecessary yield
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach committed Jul 7, 2020
1 parent 934ca04 commit f276eda
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions projects/RabbitMQ.Client/client/impl/Work.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,9 @@ protected Work(IBasicConsumer consumer)
_asyncConsumer = (IAsyncBasicConsumer)consumer;
}

public async Task Execute(IModel model)
public Task Execute(IModel model)
{
try
{
await Task.Yield();
await Execute(model, _asyncConsumer).ConfigureAwait(false);
}
catch (Exception)
{
// intentionally caught
}
return Execute(model, _asyncConsumer);
}

protected abstract Task Execute(IModel model, IAsyncBasicConsumer consumer);
Expand Down

0 comments on commit f276eda

Please sign in to comment.