nbd-wtf / nostr-tools

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

fix: error thrown on ws close #387

Closed j3ko closed 5 months ago

j3ko commented 5 months ago

fixes #370

fiatjaf commented 5 months ago

Thank you for finding the bug. I've reverted it and pushed a different fix that does the same thing, but in a way that I think is clearer. Please tell me if my fix is still buggy.

j3ko commented 5 months ago

Thank you for finding the bug. I've reverted it and pushed a different fix that does the same thing, but in a way that I think is clearer. Please tell me if my fix is still buggy.

Thanks, I haven't encountered any more errors after applying the new fix. A similar change might be needed for the connectionTimeoutHandle block:

https://github.com/nbd-wtf/nostr-tools/blob/e30e08d8e2ed44c11092bf8b8a014e41b802624e/abstract-relay.ts#L81