mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-05-31 18:20:56 +02:00
I think this handles CLOSED messages better.
This commit is contained in:
parent
14fa7a0358
commit
9c692af624
@ -110,9 +110,9 @@ func (sub *Subscription) dispatchEose() {
|
||||
func (sub *Subscription) handleClosed(reason string) {
|
||||
go func() {
|
||||
sub.ClosedReason <- reason
|
||||
sub.live.Store(false) // set this so we don't send an unnecessary CLOSE to the relay
|
||||
sub.Unsub()
|
||||
}()
|
||||
sub.live.Store(false) // set this so we don't send an unnecessary CLOSE to the relay
|
||||
sub.Unsub()
|
||||
}
|
||||
|
||||
// Unsub closes the subscription, sending "CLOSE" to relay as in NIP-01.
|
||||
|
Loading…
x
Reference in New Issue
Block a user