add a small .wait() after terminating player process

Avoids python3.8/subprocess.py:942:
ResourceWarning: subprocess 90387 is still running
  _warn("subprocess %s is still running" % self.pid,
This commit is contained in:
Damien Elmes 2021-08-19 10:33:56 +10:00
parent 0671e7e712
commit b9d42af423

View file

@ -312,6 +312,7 @@ class SimpleProcessPlayer(Player): # pylint: disable=abstract-method
# should we abort playing?
if self._terminate_flag:
self._process.terminate()
self._process.wait(1)
self._process = None
return