diff --git a/osu!Lyrics/Lyrics.cs b/osu!Lyrics/Lyrics.cs index 19689ac..9e7d600 100644 --- a/osu!Lyrics/Lyrics.cs +++ b/osu!Lyrics/Lyrics.cs @@ -310,7 +310,7 @@ private async void Osu_Signal(string line) var data = line.Split('|'); if (data.Length != 4) { - throw new InvalidDataException(); + return; } // [ time, audioPath, audioPosition, beatmapPath ] // 재생 중인 곡이 바꼈다! diff --git a/osu!Lyrics/Osu.cs b/osu!Lyrics/Osu.cs index cc25235..3714fc4 100644 --- a/osu!Lyrics/Osu.cs +++ b/osu!Lyrics/Osu.cs @@ -227,13 +227,9 @@ public static bool Listen(Action onSignal) using (var sr = new StreamReader(pipe)) { pipe.Connect(); - while (pipe.IsConnected) + while (pipe.IsConnected && !sr.EndOfStream) { - try - { - onSignal(sr.ReadLine()); - } - catch {} + onSignal(sr.ReadLine()); } } });