Skip to content

Commit

Permalink
osu! 종료할 때 프로그램 크래시나는 것 수정...
Browse files Browse the repository at this point in the history
  • Loading branch information
sunghwan2789 committed Dec 20, 2015
1 parent b1be378 commit 9aa7114
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion osu!Lyrics/Lyrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
// 재생 중인 곡이 바꼈다!
Expand Down
8 changes: 2 additions & 6 deletions osu!Lyrics/Osu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,9 @@ public static bool Listen(Action<string> 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());
}
}
});
Expand Down

0 comments on commit 9aa7114

Please sign in to comment.