When lock times out, check that there are no more clients before quitting

This matters for commands that take more than one second, such as record, push, pull and clone

Created by  pmeunier  on January 17, 2021
HR3WK6A7KKILCHI2CD2BZSZQJUS44MJIT2K3WPKJBHUXGRKAQDRQC
Change contents