Commit efce226
authored
Close http session when bot closes.
This fixes an asyncio error about an unclosed session (eventually resulting in an attribute error):
```
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000023BE9D55040>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x0000023BE934B460>, 511380.203)]']
connector: <aiohttp.connector.TCPConnector object at 0x0000023BE9D55610>
Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x0000023BE87CCF40>
transport: <_ProactorSocketTransport fd=-1 read=<_OverlappedFuture cancelled>>
Traceback (most recent call last):
File "D:\programs\Python39\lib\asyncio\sslproto.py", line 684, in _process_write_backlog
self._transport.write(chunk)
File "D:\programs\Python39\lib\asyncio\proactor_events.py", line 359, in write
self._loop_writing(data=bytes(data))
File "D:\programs\Python39\lib\asyncio\proactor_events.py", line 395, in _loop_writing
self._write_fut = self._loop._proactor.send(self._sock, data)
AttributeError: 'NoneType' object has no attribute 'send'
```1 parent d247213 commit efce226
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
487 | 490 | | |
0 commit comments