mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-10-10 04:44:02 +02:00
use different contexts for the relay connection lifetime and the Connect() call.
fixes https://github.com/nbd-wtf/go-nostr/pull/86
This commit is contained in:
@@ -84,7 +84,7 @@ func (sub *Subscription) Fire() error {
|
||||
|
||||
// or when the relay connection is closed
|
||||
go func() {
|
||||
<-sub.Relay.ConnectionContext.Done()
|
||||
<-sub.Relay.connectionContext.Done()
|
||||
|
||||
// cancel the context -- this will cause the other context cancelation cause above to be called
|
||||
sub.cancel()
|
||||
|
Reference in New Issue
Block a user