Reset connecting flag when timeout.