     private let _unsubscribeSessionManager = AFHTTPSessionManager()
     private let _defaultSubscriptionTimeout: Int = 1800
     private let _eventCallBackPath = "/Event/\(NSUUID().dashlessUUIDString)"
-    private var _eventCallBackURL: NSURL? {
-        if let serverURL = _httpServer.serverURL {
-            return NSURL(string: _eventCallBackPath, relativeToURL: serverURL)!
-        }
-        
-        return nil
-    }
-    /// Calling this on the main thread is not recommended as it will block until completed, blocking the main thread is a no-no
-    private var subscriptions: [String: Subscription] {
-        var subscriptions: [String: Subscription]!
-        dispatch_sync(_concurrentSubscriptionQueue, { () -> Void in
-            // Dictionaries are structures and therefore copied when assigned to a new constant or variable
-            subscriptions = self._subscriptions
-        })
-        return subscriptions
-    }
     
     init() {
         _subscribeSessionManager.requestSerializer = UPnPEventSubscribeRequestSerializer() as AFHTTPRequestSerializer

    }
    
    private func subscriptionDidExpire(subscription: Subscription) {
        resubscribe(subscription)
    }
}


        // remove, just in case resubscription fails
        remove(subscription: subscription)
        
        let failureClosure = { (error: NSError) -> Void in
            subscription.subscriber?.subscriptionDidFail(self)
            
            if let completion = completion {
                completion(result: .Failure(error))
            }
        }
        
        // re-subscribe only if subscriber still exists
        if subscription.subscriber == nil {
            failureClosure(createError("Subscriber doesn't exist anymore"))
            return
        }
        
        self.eventCallBackURL({ [unowned self] (eventCallBackURL: NSURL?) -> Void in
            let eventCallBackURL: NSURL! = eventCallBackURL
            if eventCallBackURL == nil {
                failureClosure(createError("Event call back URL could not be created"))
                return
            }
            
            let parameters = UPnPEventSubscribeRequestSerializer.Parameters(callBack: eventCallBackURL, timeout: self._defaultSubscriptionTimeout)
            
            self._subscribeSessionManager.SUBSCRIBE(subscription.eventURLString, parameters: parameters, success: { (task: NSURLSessionDataTask, responseObject: AnyObject?) -> Void in
                let response: UPnPEventSubscribeResponseSerializer.Response! = responseObject as? UPnPEventSubscribeResponseSerializer.Response
                if response == nil {
                    failureClosure(createError("Failure serializing event subscribe response"))
                    return
                }
                
                let now = NSDate()
                let expiration = now.dateByAddingTimeInterval(NSTimeInterval(response.timeout))
                
                subscription.update(response.subscriptionID, expiration: expiration)
                
                LogInfo("Successfully re-subscribed with timeout: \(response.timeout/60) mins: \(subscription)")
                
                self.add(subscription: subscription, completion: { () -> Void in
                    if let completion = completion {
                        completion(result: .Success(subscription))
                    }
                })
                }, failure: { (task: NSURLSessionDataTask?, error: NSError) -> Void in
                    LogError("Failed to re-subscribe: \(subscription)\nerror: \(error)")
                    
                    failureClosure(error)
            })
        })
    }
    
