when shutting down server close listening socket as soon as possible
start tracking client threads in Hashtbl when they enter the scope that can remove them from the Hashtbl too