add a quick way to quit the thread when a connexion is finished