Commit 003ec65e authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

codeeditor: fixed abort handling

parent af780912
......@@ -31,6 +31,7 @@ class CodeEditorRpc:
self._thread = None
self._kill = False
self._abort = False
self._popen = None
......@@ -64,6 +65,8 @@ class CodeEditorRpc:
self._base = expand(base)
self._starttime = time.time()
self._read_amount = 0
self._kill = False
self._abort = False
try:
self._popen = Popen(
......@@ -124,13 +127,8 @@ class CodeEditorRpc:
else:
returncode = -signal.SIGKILL
# check remaing data
read_burst = min(
int(self.MAX_RATE * self.BURST_DELAY),
self.MAX_BURST
)
while self._read(read_burst):
pass
# send remaing data
self._send("data", self._popen.communicate()[0])
returncode = self._popen.poll()
runtime = round(time.time() - self._starttime, 2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment