Set the connecting flag to FALSE upon connection failure