Merge change 5199 into donut

* changes:
  Only remove client after the hardware is teared down, so a new client is rejected before old client is done.