Async Task rather than Async void

@salmons -

It was a conscious design decision since we are not awaiting anything within that method - the callback is invoked and the await happens there. Also, while I agree favoring Task over void, there is no TaskCompletionSource or Task.FromResult which returns Task…only Task, so you end up putting a “dummy” value for the result and ignoring it. That doesn’t feel right either. That being said, I am open to suggestions and improvements here.

The error “An asynchronous module or handler completed while an asynchronous operation was still pending.” is likely a bug that is an effect of another error, such as an IO error (flakey network, whatever) when the buffer is returned by the SocketAsyncEventArgs instance. In this case the error has no impact (the operation has already failed and either will be retried until timeout or fail outright) and is just logged.

Curious, which version of .NET and which SDK version are you using?

-Jeff