[18.09] backport connhelper: fix cmd.Wait() race Upstream-commit: e57b20642d Component: cli
e57b20642d