problem: send on closed channel
stanstacks opened this issue · 5 comments
This happens when using more than one relay in a pool.
panic: send on closed channel
goroutine 64 [running]:
github.com/fiatjaf/go-nostr.(*RelayPool).Add.func1()
/Users/stan/go/pkg/mod/github.com/fiatjaf/go-nostr@v0.7.4/relaypool.go:176 +0x645
created by github.com/fiatjaf/go-nostr.(*RelayPool).Add
/Users/stan/go/pkg/mod/github.com/fiatjaf/go-nostr@v0.7.4/relaypool.go:111 +0x445
exit status 2
make: *** [run] Error 1
Solution is probably to update to fiatjaf's latest library
Have you started working on this?
It looks like the library has changed quite a bit, it's now in a new org etc and a lot of the methods have changed.
Anyway if you haven't started on it I'll take a look at this one.
Thanks! I've assigned you to it, just to make it clear to anyone else that it's taken.
@gazhayes are you still wanting to work on this one?
I've resolved this, but the problem is fiatjaf hasn't merged your patch yet so I used a local copy of the module instead replace github.com/nbd-wtf/go-nostr => ../other/go-nostr
but this will break if anyone else uses it. Simplest thing to do is just wait for your patch to be merged.
solved in #6