[Refactor] Remove some unnecessary async/await (#2739)

* Remove some unnecessary async/await

* More not-so-async stuff

* More not-so-async stuff

* Fix merge issue
This commit is contained in:
Dmitry
2023-11-19 00:29:14 +03:00
committed by GitHub
parent 699554ad11
commit 86655a8157
73 changed files with 1020 additions and 1020 deletions

View File

@@ -116,7 +116,7 @@ namespace Discord.Net.Udp
_cancelToken = _cancelTokenSource.Token;
}
public async Task SendAsync(byte[] data, int index, int count)
public Task SendAsync(byte[] data, int index, int count)
{
if (index != 0) //Should never happen?
{
@@ -124,7 +124,7 @@ namespace Discord.Net.Udp
Buffer.BlockCopy(data, index, newData, 0, count);
data = newData;
}
await _udp.SendAsync(data, count, _destination).ConfigureAwait(false);
return _udp.SendAsync(data, count, _destination);
}
private async Task RunAsync(CancellationToken cancelToken)