mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-12 17:12:40 +01:00
DroidFish: Fixed NPE when shutting down program while trying to contact a network engine.
This commit is contained in:
@@ -244,8 +244,10 @@ public class NetworkEngine extends UCIEngineBase {
|
||||
isRunning = false;
|
||||
if (startupThread != null)
|
||||
startupThread.interrupt();
|
||||
if (socket != null) {
|
||||
try { socket.getOutputStream().write("quit\n".getBytes()); } catch (IOException e) {}
|
||||
try { socket.close(); } catch (IOException e) {}
|
||||
}
|
||||
super.shutDown();
|
||||
if (stdOutThread != null)
|
||||
stdOutThread.interrupt();
|
||||
|
||||
Reference in New Issue
Block a user