Close requests Session at the end of Stream._run
authorHarmon <Harmon758@gmail.com>
Sat, 23 Jan 2021 00:18:25 +0000 (18:18 -0600)
committerHarmon <Harmon758@gmail.com>
Sat, 23 Jan 2021 00:18:25 +0000 (18:18 -0600)
tweepy/streaming.py

index 5323cba0d9180153a9275db3a386703968b6b190..43426732b32ab75a9a66ccc5967d69040fe6aff5 100644 (file)
@@ -210,6 +210,7 @@ class Stream:
             self.listener.on_exception(exc)
             raise
         finally:
+            self.session.close()
             self.running = False
 
     def _read_loop(self, resp):