summaryrefslogtreecommitdiff
path: root/searx/network/__init__.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-09-23 11:31:29 +0200
committerAlexandre Flament <alex@al-f.net>2021-10-12 21:01:02 +0200
commitf9c6393502ece3a678e530ca787efe2ea22b51d7 (patch)
tree441777b67955178752d41f1496fcec1ac5877eba /searx/network/__init__.py
parent4cc1ee8565e22442ae92ed5f2015749d684e6087 (diff)
downloadsearxng-f9c6393502ece3a678e530ca787efe2ea22b51d7.tar.gz
searxng-f9c6393502ece3a678e530ca787efe2ea22b51d7.zip
[enh] verify that Tor proxy works every time searx starts
based on @MarcAbonce commit on searx
Diffstat (limited to 'searx/network/__init__.py')
-rw-r--r--searx/network/__init__.py4
1 files changed, 2 insertions, 2 deletions
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