Skip to content

Commit 983ae66

Browse files
author
Jon Staab
committed
Fix relay info endpoint
1 parent 70afea8 commit 983ae66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dufflepud/app.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def req_json_async(method, url, **kw):
132132
try:
133133
f = getattr(session, method)
134134

135-
async with f(url, **kw) as response:
135+
async with f(url, timeout=10, **kw) as response:
136136
return json.loads(await response.text())
137137
except:
138138
return None
@@ -168,7 +168,7 @@ async def _get_relay_info(ws_url):
168168
http_url = re.sub(r'ws(s?)://', r'http\1://', ws_url)
169169
headers = {'Accept': 'application/nostr+json'}
170170

171-
return await req_json_async('post', http_url, headers=headers, timeout=1)
171+
return await req_json_async('get', http_url, headers=headers)
172172

173173

174174
@redis_cache('handle')

0 commit comments

Comments
 (0)