Skip to content

Commit 1351f1f

Browse files
committed
2 parents 132d78c + 89f5385 commit 1351f1f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pythonFiles/completion.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,14 @@ def _write_response(self, response):
579579
def watch(self):
580580
while True:
581581
try:
582-
self._process_request(self._input.readline())
582+
rq = self._input.readline()
583+
if len(rq) == 0:
584+
# Reached EOF - indication our parent process is gone.
585+
sys.stderr.write('Received EOF from the standard input,exiting' + '\n')
586+
sys.stderr.flush()
587+
return
588+
self._process_request(rq)
589+
583590
except Exception:
584591
sys.stderr.write(traceback.format_exc() + '\n')
585592
sys.stderr.flush()

0 commit comments

Comments
 (0)