Skip to content

Commit

Permalink
fix peer panic from fabric/gossip/util (hyperledger#5136)
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Partanskiy <fedor.partanskiy@atme.com>
  • Loading branch information
pfi79 authored Feb 8, 2025
1 parent 9b20f5c commit fbc557f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gossip/util/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@ func (ps *PubSub) Subscribe(topic string, ttl time.Duration) Subscription {
s = NewSet()
ps.subscriptions[topic] = s
}
ps.Unlock()

// Add the subscription
s.Add(sub)
ps.Unlock()

// When the timeout expires, remove the subscription
time.AfterFunc(ttl, func() {
Expand Down

0 comments on commit fbc557f

Please # to comment.