 			return
 		}
 
+		if let reachability = reachability {
+			guard reachability.isReachable() else {
+				if !sendingInterruptedBecauseUnreachable {
+					sendingInterruptedBecauseUnreachable = true
+
+					logDebug("Internet is unreachable. Pausing requests.")
+
+					do {
+						try reachability.startNotifier()
+					}
+					catch let error {
+						logError("Cannot listen for reachability events: \(error)")
+					}
+				}
+
+				return
+			}
+
+			sendingInterruptedBecauseUnreachable = false
+			reachability.stopNotifier()
+		}
+
 		let url = queue[0]
+
+		if url != currentRequest {
+			currentFailureCount = 0
+			currentRequest = url
+		}
 
 		logDebug("Sending: \(url)")
 

import Foundation


internal final class RequestManager {

	internal typealias Delegate = _RequestManagerDelegate

	private var numberOfFailuresForCurrentRequest = 0
	private var pendingTask: NSURLSessionDataTask?
	private var sendNextRequestTimer: NSTimer?

	internal private(set) var queue = [NSURL]()
	internal private(set) var started = false

		let task = NSURLSession.defaultSession().dataTaskWithURL(url) { data, response, error in
			if let error = error {
				let retryable: Bool
				let isCompletelyOffline: Bool

				switch error.code {
				case NSURLErrorBadServerResponse,
				     NSURLErrorCallIsActive,
				     NSURLErrorCannotConnectToHost,
				     NSURLErrorCannotFindHost,
				     NSURLErrorDataNotAllowed,
