mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-21 18:15:50 +08:00
Update nonebot/drivers/fastapi.py
This commit is contained in:
parent
226fc0feb3
commit
aea961b346
@ -467,10 +467,10 @@ class FullDriver(ForwardDriver, Driver):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if not client:
|
if not client:
|
||||||
client = httpx.AsyncClient(http2=http2, follow_redirects=True)
|
client = httpx.AsyncClient(http2=setup.http_version == "2", follow_redirects=True)
|
||||||
elif http2 != (setup.http_version == "2"):
|
elif http2 != (setup.http_version == "2"):
|
||||||
await client.aclose()
|
await client.aclose()
|
||||||
client = httpx.AsyncClient(http2=http2, follow_redirects=True)
|
client = httpx.AsyncClient(http2=setup.http_version == "2", follow_redirects=True)
|
||||||
http2 = setup.http_version == "2"
|
http2 = setup.http_version == "2"
|
||||||
|
|
||||||
if not bot:
|
if not bot:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user