File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -486,7 +486,8 @@ async def _stop(self) -> None:
486486 self ._websocket ._closing_lock .set () # Toggles the "ready-to-shutdown" state for the bot.
487487 # And subsequently, the processes will close itself.
488488
489- await self ._http ._req ._session .close () # Closes the HTTP session associated with the client.
489+ if isinstance (self ._http , HTTPClient ):
490+ await self ._http ._req ._session .close () # Closes the HTTP session associated with the client.
490491
491492 async def _login (self ) -> None :
492493 """Makes a login with the Discord API."""
@@ -1638,7 +1639,8 @@ async def request_guild_members(
16381639
16391640 async def _logout (self ) -> None :
16401641 await self ._websocket .close ()
1641- await self ._http ._req .close ()
1642+ if isinstance (self ._http , HTTPClient ):
1643+ await self ._http ._req .close ()
16421644
16431645 async def wait_for (
16441646 self ,
You can’t perform that action at this time.
0 commit comments