Skip to content

Commit

Permalink
Default AsyncBaseStream to abort closed SSL transports
Browse files Browse the repository at this point in the history
Resolves #1904
  • Loading branch information
Harmon758 committed Oct 29, 2022
1 parent 51a5d61 commit 1aa5d39
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tweepy/asynchronous/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ async def _connect(

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
Expand Down

0 comments on commit 1aa5d39

Please sign in to comment.