Fix Race when killing the daemon Upstream-commit: d8425d98e61500efa5c404f7450ed4876c7c407a Component: engine