From 983ae66e758da6cda3726abf0eff820efa8c7b71 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 24 Sep 2024 14:46:18 -0700 Subject: [PATCH] Fix relay info endpoint --- dufflepud/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dufflepud/app.py b/dufflepud/app.py index 16b1313..01234bb 100644 --- a/dufflepud/app.py +++ b/dufflepud/app.py @@ -132,7 +132,7 @@ async def req_json_async(method, url, **kw): try: f = getattr(session, method) - async with f(url, **kw) as response: + async with f(url, timeout=10, **kw) as response: return json.loads(await response.text()) except: return None @@ -168,7 +168,7 @@ async def _get_relay_info(ws_url): http_url = re.sub(r'ws(s?)://', r'http\1://', ws_url) headers = {'Accept': 'application/nostr+json'} - return await req_json_async('post', http_url, headers=headers, timeout=1) + return await req_json_async('get', http_url, headers=headers) @redis_cache('handle')