[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user