tries to connect three times when perform_diagnostic runs