Remove static property and use function to determine if the connection attempt should be made during construction