Resolves #87
This commit is contained in:
@@ -57,7 +57,7 @@ class PyroClient(PyroClient):
|
||||
self.config["bot"]["owner"]
|
||||
]
|
||||
|
||||
self.sender_session = ClientSession()
|
||||
self.sender_session: Union[ClientSession, None] = None
|
||||
|
||||
self.scopes_placeholders: Dict[str, int] = {
|
||||
"owner": self.owner,
|
||||
@@ -67,6 +67,9 @@ class PyroClient(PyroClient):
|
||||
async def start(self):
|
||||
await super().start()
|
||||
|
||||
if self.sender_session is None:
|
||||
self.sender_session = ClientSession()
|
||||
|
||||
if self.config["reports"]["update"]:
|
||||
try:
|
||||
async with ClientSession(
|
||||
@@ -134,7 +137,9 @@ class PyroClient(PyroClient):
|
||||
)
|
||||
|
||||
await http_session.close()
|
||||
await self.sender_session.close()
|
||||
|
||||
if self.sender_session is not None:
|
||||
await self.sender_session.close()
|
||||
|
||||
await super().stop()
|
||||
|
||||
|
Reference in New Issue
Block a user