close client when thread is done in CommandSender