Fixed an issue related to high CPU Usage when Streaming is enabled. Closes #220

This commit is contained in:
2018-06-06 11:14:42 -05:00
parent 9847f7ad01
commit a2cb4ba889
2 changed files with 7 additions and 6 deletions

View File

@@ -395,13 +395,13 @@ class Session(object):
self.logged = False
self.twitter = twitter.twitter.twitter()
self.login(False)
pub.sendMessage("restart_streams", session=self.session_id)
if self.reconnection_function_active == True: return
self.reconnection_function_active = True
if not hasattr(self, "main_stream") or not application.streaming_lives():
self.get_main_stream()
if not hasattr(self, "timelinesStream") or application.streaming_lives():
self.get_timelines()
self.counter = 0
self.reconnection_function_active = False
if hasattr(self, "timelinesStream") and not hasattr(self.timelinesStream, "friends"):
self.add_friends()