From: Harmon Date: Sat, 29 Oct 2022 03:14:50 +0000 (-0500) Subject: Default AsyncBaseStream to abort closed SSL transports X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1aa5d395f48f29b36659a9616cb0b678192e9f29;p=tweepy.git Default AsyncBaseStream to abort closed SSL transports Resolves #1904 --- 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