aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]pycrctrl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pycrctrl.py b/pycrctrl.py
index 3c0c5d3..9b43212 100755..100644
--- a/pycrctrl.py
+++ b/pycrctrl.py
@@ -290,6 +290,8 @@ Snapshot=openclonk-snapshot-(.*)-(.*)-{}-{}-."""
def startClonk(self):
try:
while True:
+ if self.shutdowned:
+ return
if self.scenario == "":
if self.queue.empty() == False:
self.scenario = self.queue.get()
@@ -315,7 +317,7 @@ Snapshot=openclonk-snapshot-(.*)-(.*)-{}-{}-."""
break
finally:
- if self.clonk:
+ if self.clonk and self.clonk.stdin and not self.clonk.stdin.closed:
self.clonk.stdin.close()
def readServerOutput(self):
@@ -581,7 +583,6 @@ def quit(args):
reply = args[0]
if server.clonk and server.clonk.stdin:
server.clonk.stdin.close()
- server.server_thread.terminate()
server.shutdown()
sleep(5)
raise SystemExit