     
     public func cancelPinCode()
     {
-        self.cancelPinCodeRequest = true
+        self.continuePinCodeAuthorizationRefreshCycle = false
     }
     
     // MARK: - Private

    /// Pin code authentication, for devices like Apple TV.
    public func pinCode(infoHandler infoHandler: (pinCode: String, activateLink: String) -> Void, completion: AuthenticationCompletion)
    {
        func doPinCodeAuthorization(userCode userCode: String, deviceCode: String)
        {
            let authorizationRequest = AuthenticationRequest.authorizePinCodeRequest(userCode: userCode, deviceCode: deviceCode)
            
            self.authenticate(request: authorizationRequest) { result in
                
                switch result
                {

                case .Failure(let error):
                    if error.statusCode == HTTPStatusCode.BadRequest.rawValue // 400: Bad Request implies the code hasn't been activated yet, so try again.
                    {
                        if strongSelf.continuePinCodeAuthorizationRefreshCycle
                        {
                            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(strongSelf.dynamicType.PinCodeRequestInterval * NSTimeInterval(NSEC_PER_SEC))), dispatch_get_main_queue())
                            {
                                doPinCodeAuthorization(userCode: userCode, deviceCode: deviceCode)
                            }
