DroidFish: Terminate the stderr-reading thread if the external engine crashes.

This commit is contained in:
Peter Osterlund 2012-01-08 17:25:28 +00:00
parent 0d43a3bd7c
commit ec8993ba8f

View File

@ -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;
}