diff --git a/nostr_relay_discovery.py b/nostr_relay_discovery.py index f22aa0e..6c54829 100644 --- a/nostr_relay_discovery.py +++ b/nostr_relay_discovery.py @@ -128,7 +128,8 @@ class NostrRelayDiscovery: async with websockets.connect( relay_url, - timeout=self.connection_timeout, + open_timeout=self.connection_timeout, + close_timeout=5, max_size=2**20, # 1MB max message size ping_interval=None # Disable ping ) as websocket: @@ -205,7 +206,8 @@ class NostrRelayDiscovery: async with websockets.connect( relay_url, - timeout=self.connection_timeout, + open_timeout=self.connection_timeout, + close_timeout=5, max_size=2**20 ) as websocket: # Request follow lists (kind 3 events) diff --git a/requirements.txt b/requirements.txt index a1fb46e..31b5e2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -websockets>=11.0.0 +websockets>=12.0