nbd-wtf / nostr-tools

Tools for developing Nostr clients.
The Unlicense
685 stars 191 forks source link

Correctly wait until connection to a relay is established #331

Closed jiftechnify closed 9 months ago

jiftechnify commented 9 months ago

relayConnect() doesn't await on relay.connect() and just return Relay, so await on relayConnect() as the README won't work as expected (it should make sure that connection to a relay is established), I think.

I made relayConnect async function and correctly await on relay.connect().