From f9c6393502ece3a678e530ca787efe2ea22b51d7 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Thu, 23 Sep 2021 11:31:29 +0200 Subject: [enh] verify that Tor proxy works every time searx starts based on @MarcAbonce commit on searx --- searx/network/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searx/network/__init__.py') diff --git a/searx/network/__init__.py b/searx/network/__init__.py index 496fd2fbf..82959e355 100644 --- a/searx/network/__init__.py +++ b/searx/network/__init__.py @@ -12,7 +12,7 @@ import httpx import anyio import h2.exceptions -from .network import get_network, initialize +from .network import get_network, initialize, check_network_configuration from .client import get_loop from .raise_for_httperror import raise_for_httperror @@ -160,7 +160,7 @@ def delete(url, **kwargs): async def stream_chunk_to_queue(network, queue, method, url, **kwargs): try: - async with network.stream(method, url, **kwargs) as response: + async with await network.stream(method, url, **kwargs) as response: queue.put(response) # aiter_raw: access the raw bytes on the response without applying any HTTP content decoding # https://www.python-httpx.org/quickstart/#streaming-responses -- cgit v1.2.3