Fixed 100% cpu usage on single threaded systems. Totally my bad.

This commit is contained in:
Master Kwoth 2017-07-08 13:42:16 +02:00
parent 568cdfbd3c
commit 72e7b04319

View File

@ -160,9 +160,8 @@ namespace NadekoBot.Services.Music
manualSkip = false; manualSkip = false;
manualIndex = false; manualIndex = false;
} }
if (data.Song == null) if (data.Song != null)
continue; {
_log.Info("Starting"); _log.Info("Starting");
using (var b = new SongBuffer(await data.Song.Uri(), "", data.Song.ProviderType == Database.Models.MusicType.Local)) using (var b = new SongBuffer(await data.Song.Uri(), "", data.Song.ProviderType == Database.Models.MusicType.Local))
{ {
@ -328,6 +327,7 @@ namespace NadekoBot.Services.Music
{ {
_log.Error(ex); _log.Error(ex);
} }
}
do do
{ {
await Task.Delay(500); await Task.Delay(500);