ensure all client threads get cancelled when shutting down the server
Merge pull request #291 from Incubaid/server-shutdown

ensure all client threads get cancelled when shutting down the server