Skip to content

Commit 0b90d88

Browse files
khokhlov962V8 LUCI CQ
authored andcommitted
Make sure WPR process is killed before exiting
Port forwarding stops before atexit hooks are called, so at the moment when we try to shutdown WPR, it's no longer possible to send commands to it via network requests. So to avoid stale processes accumulating on the device, we have to kill the process before exit. Change-Id: I572e73834926131753a02e892cc78dcf7753aedd Reviewed-on: https://chromium-review.googlesource.com/c/crossbench/+/6650795 Reviewed-by: Camillo Bruni <[email protected]> Commit-Queue: Mikhail Khokhlov <[email protected]>
1 parent 3dcf4b4 commit 0b90d88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crossbench/network/replay/web_page_replay.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def base_cmd_flags(self) -> TupleCmdArgs:
170170

171171
def start(self) -> None:
172172
try:
173-
atexit.register(self.stop)
173+
atexit.register(self.stop, force_shutdown=True)
174174
self._start_wpr()
175175
logging.info("WPR: waiting for startup...")
176176
self._wait_for_startup()

0 commit comments

Comments
 (0)