Determines if reconnection should be attempted.
bool shouldReconnect(int attemptNumber, int maxAttempts);