Performance improvements (#19)

* fix: increase the wait time for re-connecting to a relay

* fix: blocking sleep

* fix: remove blocking sleep

* fix: allow multiple filters per request
This commit is contained in:
Vlad Stan 2023-09-12 15:06:28 +03:00 committed by GitHub
parent 9d9fbc0189
commit e6624f76bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 18 deletions

View file

@ -66,13 +66,15 @@ async def subscribe_events():
return
t = threading.Thread(
target=nostr.client.subscribe,
args=(
def wrap_async_subscribe():
asyncio.run(nostr.client.subscribe(
callback_events,
callback_notices,
callback_eose_notices,
),
))
t = threading.Thread(
target=wrap_async_subscribe,
name="Nostr-event-subscription",
daemon=True,
)