Added connexion timeout and other inf loop timeout