mirror of
https://github.com/Stone-Red-Code/HyperbolicDownloader.git
synced 2026-09-04 00:56:09 +02:00
Properly handle unexpected end of stream
This commit is contained in:
@@ -181,6 +181,12 @@ public class StreamingCommands(HostsManager hostsManager)
|
||||
try
|
||||
{
|
||||
bytesRead = nwStream.Read(reciveBuffer, 0, reciveBuffer.Length);
|
||||
|
||||
if (bytesRead == 0 && bufferedWaveProvider.BufferedBytes == 0)
|
||||
{
|
||||
player.Stop();
|
||||
ApiManager.SendNotificationMessage($"\r[{player.PlaybackState,-7}]");
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user