FIXED not using timeout to detect connection failure