Fixed a couple small errors

This commit is contained in:
RogueException
2017-04-01 11:23:49 -03:00
parent 73dfb8c699
commit 7242a85200
2 changed files with 3 additions and 1 deletions

View File

@@ -25,6 +25,8 @@ namespace Discord.Audio.Streams
public override Task<RTPFrame?> ReadFrameAsync(CancellationToken cancelToken)
{
cancelToken.ThrowIfCancellationRequested();
if (_frames.TryDequeue(out var frame))
return Task.FromResult<RTPFrame?>(frame);
return Task.FromResult<RTPFrame?>(null);

View File

@@ -233,7 +233,7 @@ namespace Discord.WebSocket
int id = _shardIds[i];
var arr = guilds.Where(x => GetShardIdFor(x) == id).ToArray();
if (arr.Length > 0)
await _shards[i].DownloadUsersAsync(arr);
await _shards[i].DownloadUsersAsync(arr).ConfigureAwait(false);
}
}