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:
parent
9d9fbc0189
commit
e6624f76bd
5 changed files with 24 additions and 18 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import time
|
||||
import asyncio
|
||||
from typing import List
|
||||
|
||||
from ..relay_manager import RelayManager
|
||||
|
|
@ -21,7 +21,7 @@ class NostrClient:
|
|||
def close(self):
|
||||
self.relay_manager.close_connections()
|
||||
|
||||
def subscribe(
|
||||
async def subscribe(
|
||||
self,
|
||||
callback_events_func=None,
|
||||
callback_notices_func=None,
|
||||
|
|
@ -41,4 +41,4 @@ class NostrClient:
|
|||
if callback_eosenotices_func:
|
||||
callback_eosenotices_func(event_msg)
|
||||
|
||||
time.sleep(0.1)
|
||||
await asyncio.sleep(0.5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue