Update streaming.py
authorConstantine <ignalion@gmail.com>
Mon, 23 Jun 2014 09:20:28 +0000 (12:20 +0300)
committerConstantine <ignalion@gmail.com>
Mon, 23 Jun 2014 09:20:28 +0000 (12:20 +0300)
Changed _start() method of Stream class so now thread can be join'ed.

tweepy/streaming.py

index 831474d915f4a158192a5b3875c73759769c55be..b22299b83e3467cd3dc33c90f846947a505437fe 100644 (file)
@@ -231,7 +231,8 @@ class Stream(object):
     def _start(self, async):
         self.running = True
         if async:
-            Thread(target=self._run).start()
+            self._thread = Thread(target=self._run)
+            self._thread.start()
         else:
             self._run()