aboutsummaryrefslogtreecommitdiff
path: root/discord/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/http.py')
-rw-r--r--discord/http.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/http.py b/discord/http.py
index 3fb13591..d098a0a4 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -230,7 +230,8 @@ class HTTPClient:
# state management
async def close(self):
- await self._session.close()
+ if self._session:
+ await self._session.close()
def _token(self, token, *, bot=True):
self.token = token