We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b822385 commit 1629bfdCopy full SHA for 1629bfd
src/Assets/Scripts/Net/TorrentClient.cs
@@ -52,12 +52,22 @@ private string ReadCommandResult()
52
53
while (!str.ToString().EndsWith("#=end"))
54
{
55
+ ThrowIfProcessExited();
56
+
57
str.Append((char)_stdOutput.Read());
58
}
59
60
return str.ToString().Substring(0, str.Length - 5);
61
62
63
+ private void ThrowIfProcessExited()
64
+ {
65
+ if (_process.HasExited)
66
67
+ throw new Exception("torrent-client process has exited");
68
+ }
69
70
71
private StreamReader CreateStdOutputStream()
72
73
return new StreamReader(_process.StandardOutput.BaseStream, CreateStdEncoding());
0 commit comments