           case .Failure(let error):
             if count > 0 {
               count--
-              attempt()
+              attempt?()
             } else {
               observer.failure(error)
             }

    return create { observer in
      let serialDisposable = SerialDisposable(otherDisposable: nil)
      
      var attempt: (() -> Void)!
      
      attempt = {
        serialDisposable.otherDisposable?.dispose()
        serialDisposable.otherDisposable = self.observe(on: nil) { event in

        }
      }
      
      attempt?()
      return BlockDisposable {
        serialDisposable.dispose()
        attempt = nil
      }
    }
  }
  
