From aea961b34667c68de1c877c8b218febea9303fb3 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sat, 4 Dec 2021 14:15:00 +0800 Subject: [PATCH] Update nonebot/drivers/fastapi.py --- nonebot/drivers/fastapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nonebot/drivers/fastapi.py b/nonebot/drivers/fastapi.py index 3b355e3f..ac23081b 100644 --- a/nonebot/drivers/fastapi.py +++ b/nonebot/drivers/fastapi.py @@ -467,10 +467,10 @@ class FullDriver(ForwardDriver, Driver): continue 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"): 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" if not bot: