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):
323
323
324
324
def stop (self ):
325
325
if self .process :
326
- self .process .terminate ()
327
326
try :
328
327
self .process .communicate (timeout = 10 )
329
328
except subprocess .TimeoutExpired :
330
329
# 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 ()
332
337
self .process .stdout .close ()
333
338
self .process = None
334
339
self .conn_pool .clear ()
You can’t perform that action at this time.
0 commit comments