Skip to content

Commit ac9965d

Browse files
authored
fix: unclosed file <_io.BufferedReader name error by proper cleanup of subprocess.Popen process (#965)
#962 add a Popen.communicate call after terminate to ensure that file stdout and sdterr file descriptors are closed properly.
1 parent 6f48898 commit ac9965d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

appium/webdriver/appium_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def stop(self) -> bool:
235235
if self.is_running:
236236
assert self._process
237237
self._process.terminate()
238+
self._process.communicate(timeout=5)
238239
is_terminated = True
239240
self._process = None
240241
self._cmd = None

0 commit comments

Comments
 (0)