File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -323,12 +323,17 @@ def start(self):
323323
324324 def stop (self ):
325325 if self .process :
326- self .process .terminate ()
327326 try :
328327 self .process .communicate (timeout = 10 )
329328 except subprocess .TimeoutExpired :
330329 # On GHA/Windows, it always runs into a timeout, even after 45 seconds.
331- pass
330+ #
331+ # The child process is not killed if the timeout expires, so in order
332+ # to cleanup properly a well-behaved application should kill the child
333+ # process and finish communication.
334+ # https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate
335+ self .process .kill ()
336+ self .process .communicate ()
332337 self .process .stdout .close ()
333338 self .process = None
334339 self .conn_pool .clear ()
You can’t perform that action at this time.
0 commit comments