From 1aa5d395f48f29b36659a9616cb0b678192e9f29 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 28 Oct 2022 22:14:50 -0500 Subject: [PATCH] Default AsyncBaseStream to abort closed SSL transports Resolves #1904 --- tweepy/asynchronous/streaming.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tweepy/asynchronous/streaming.py b/tweepy/asynchronous/streaming.py index 0a943f2..c413a53 100644 --- a/tweepy/asynchronous/streaming.py +++ b/tweepy/asynchronous/streaming.py @@ -53,6 +53,7 @@ class AsyncBaseStream: if self.session is None or self.session.closed: self.session = aiohttp.ClientSession( + connector=aiohttp.TCPConnector(enable_cleanup_closed=True), timeout=aiohttp.ClientTimeout(sock_read=timeout) ) self.session.headers["User-Agent"] = self.user_agent -- 2.25.1