mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-15 10:31:04 +00:00
🐛 Bug: 添加 HTTP 客户端会话上下文检查 (#2632)
This commit is contained in:
@ -93,6 +93,8 @@ class Session(HTTPClientSession):
|
||||
|
||||
@override
|
||||
async def setup(self) -> None:
|
||||
if self._client is not None:
|
||||
raise RuntimeError("Session has already been initialized")
|
||||
self._client = httpx.AsyncClient(
|
||||
params=self._params,
|
||||
headers=self._headers,
|
||||
|
Reference in New Issue
Block a user