mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-02-07 12:49:12 +01:00
DroidFish: Terminate the stderr-reading thread if the external engine crashes.
This commit is contained in:
parent
0d43a3bd7c
commit
ec8993ba8f
|
@ -146,7 +146,9 @@ public class ExternalEngine extends UCIEngineBase {
|
|||
if ((ep == null) || Thread.currentThread().isInterrupted())
|
||||
return;
|
||||
try {
|
||||
ep.getErrorStream().read(buffer);
|
||||
int len = ep.getErrorStream().read(buffer, 0, 1);
|
||||
if (len < 0)
|
||||
break;
|
||||
} catch (IOException e) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user