fix relay health check

This commit is contained in:
thePR0M3TH3AN
2025-07-06 17:07:34 -04:00
parent daf05f0695
commit af049a258a
2 changed files with 38 additions and 3 deletions

View File

@@ -153,10 +153,8 @@ class NostrClient:
while True:
msg = await asyncio.wait_for(ws.recv(), timeout=timeout)
data = json.loads(msg)
if data[0] == "EVENT":
if data[0] in {"EVENT", "EOSE"}:
return True
if data[0] == "EOSE":
return False
except Exception:
return False