Global Feed Post Login
Replying to Avatar Cody

This issue is caused by calling `relay.auth()` twice in quick succession. Since both auth events were signed within the same second, they are identical. Looking at the nostr-tools source code, I found that this prevents the first `relay.auth()` call from ever returning.

I'll find a way to avoid consecutive calls to `relay.auth()`, but it might be better to modify nostr-tools to handle this properly.

https://github.com/nbd-wtf/nostr-tools/blob/9a612e59a254fd2fb54127073051ac47031858d1/abstract-relay.ts#L251

Avatar
fiatjaf 9mo ago

This was a very good catch.

One of these days I'll go back to nostr-tools and fix all the bugs.

Reply to this note

Please Login to reply.

Discussion

Avatar
Cody 9mo ago

Looking forward to your return! This bug is relatively simple, maybe I can create a PR to fix it.

Thread collapsed