mirror of
https://github.com/searxng/searxng.git
synced 2025-12-24 04:30:02 +00:00
[fix] engines - set hard timouts in *sub-request* (#5460)
The requests changed here all run outside of the network context timeout, thereby preventing the engine's timeout from being applied (the engine's timeout can become longer than it was configured). Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -66,7 +66,7 @@ def setup(engine_settings: dict[str, t.Any]) -> bool:
|
||||
def get_ui_version() -> str:
|
||||
ret_val: str = CACHE.get("X-S2-UI-Version")
|
||||
if not ret_val:
|
||||
resp = get(base_url)
|
||||
resp = get(base_url, timeout=3)
|
||||
if not resp.ok:
|
||||
raise RuntimeError("Can't determine Semantic Scholar UI version")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user