Skip to content

Commit

Permalink
Fix relay info endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Staab committed Sep 24, 2024
1 parent 70afea8 commit 983ae66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dufflepud/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 983ae66

Please sign in to comment.