Fixes a race condition in client events monitoring Upstream-commit: 368e309073 Component: cli
368e309073