Prevent AttributeError when closing HTTPClient early.
This commit is contained in:
parent
63c5892b43
commit
df130e10f0
@ -230,6 +230,7 @@ class HTTPClient:
|
|||||||
# state management
|
# state management
|
||||||
|
|
||||||
async def close(self):
|
async def close(self):
|
||||||
|
if self._session:
|
||||||
await self._session.close()
|
await self._session.close()
|
||||||
|
|
||||||
def _token(self, token, *, bot=True):
|
def _token(self, token, *, bot=True):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user