mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-19 10:36:42 +01:00
fixing subscription labels and ids.
This commit is contained in:
9
relay.go
9
relay.go
@@ -385,19 +385,16 @@ func (r *Relay) QuerySync(ctx context.Context, filter Filter) []*Event {
|
||||
}
|
||||
|
||||
func (r *Relay) PrepareSubscription() *Subscription {
|
||||
id := subscriptionIdCounter
|
||||
current := subscriptionIdCounter
|
||||
subscriptionIdCounter++
|
||||
|
||||
sub := &Subscription{
|
||||
return &Subscription{
|
||||
Relay: r,
|
||||
conn: r.Connection,
|
||||
id: id,
|
||||
counter: current,
|
||||
Events: make(chan *Event),
|
||||
EndOfStoredEvents: make(chan struct{}, 1),
|
||||
}
|
||||
|
||||
r.subscriptions.Store(sub.GetID(), sub)
|
||||
return sub
|
||||
}
|
||||
|
||||
func (r *Relay) Close() error {
|
||||
|
||||
Reference in New Issue
Block a user