         }
         
         if Static.backgroundTaskIdentifier == UIBackgroundTaskInvalid {
+            NSLog("backgroundTaskIdentifier: beginBackgroundTask")
             Static.backgroundTaskIdentifier = UIApplication.sharedApplication().beginBackgroundTaskWithExpirationHandler() {
+                NSLog("backgroundTaskIdentifier: Expiration")
                 if Static.backgroundTaskIdentifier != UIBackgroundTaskInvalid {
+                    NSLog("backgroundTaskIdentifier: endBackgroundTask")
+                    self.stopStreamingIFConnected()
                     UIApplication.sharedApplication().endBackgroundTask(Static.backgroundTaskIdentifier)
                     Static.backgroundTaskIdentifier = UIBackgroundTaskInvalid
                 }

        }
        
        Static.streamingRequest = getCurrentClient()?.getUserStreamDelimited(delimited: nil,
            stallWarnings: nil,
            includeMessagesFromFollowedAccounts: nil,
            includeReplies: nil,
            track: nil,

    class func setup() {
        let reachability = Reachability.reachabilityForInternetConnection()
        reachability.whenReachable = { reachability in
            NSLog("whenReachable")
            Async.main(after: 2) {
                Twitter.startStreamingIfEnable()
            }
            return
        }
        
        reachability.whenUnreachable = { reachability in
            NSLog("whenUnreachable")
        }
        
        reachability.startNotifier()
        
