     }
 
     /**
-     Resets the state.
-     */
-    private func resetState() {
-        /*retryCount = 0
-
-        timer?.invalidate()
-        timer = NSTimer.scheduledTimerWithTimeInterval(
-            adjustQualityTimeInternal, target: self, selector: .timerTicked,
-            userInfo: nil, repeats: false)*/
-    }
-
-    /**
-     Checks that the interruption count is lower than `adjustQualityAfterInterruptionCount`. If it
-     isn't, the function generates an event and reset its state.
-     */
-    private func checkRetryCount() {
-        /*if retryCount >= adjustQualityAfterInterruptionCount && listening {
-            //Now we need to stop the timer
-            timer?.invalidate()
-
-            //Calls the listener
-            eventListener?.onEvent(QualityAdjustmentEvent.GoDown, generetedBy: self)
-
-            //Reset state
-            resetState()
-        }*/
-    }
-
-    /**
-     The quality adjuster ticked.
+     The retry timer ticked.
      */
     @objc private func timerTicked(_: AnyObject) {
-        /*if retryCount == 0 {
-            eventListener?.onEvent(RetryEvent.GoUp, generetedBy: self)
+        retryCount += 1
+
+        if retryCount < maximumRetryCount {
+            eventListener?.onEvent(RetryEvent.RetryAvailable, generetedBy: self)
+        } else {
+            eventListener?.onEvent(RetryEvent.RetryFailed, generetedBy: self)
         }
-
-        //Reset state
-        resetState()*/
     }
 }

        }

        //Reset state
        resetState()

        //Saving that we're currently listening
        listening = true

    /**
     `RetryEvent` is a list of event that can be generated by `RetryEventProducer`.

     - RetryAvailable: A retry is available.
     - RetryFailed:    Retrying is no longer an option.
     */
    enum RetryEvent: Event {
        case RetryAvailable
        case RetryFailed
    }

    /// The timer used to adjust quality
