We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1af2e2e commit e7fad48Copy full SHA for e7fad48
p2p/subscriber.go
@@ -5,6 +5,7 @@ import (
5
"errors"
6
"fmt"
7
"sync"
8
+ "time"
9
10
pubsub "github.com/libp2p/go-libp2p-pubsub"
11
"github.com/libp2p/go-libp2p/core/peer"
@@ -85,7 +86,7 @@ func NewSubscriber[H header.Header[H]](
85
86
// be called separately to ensure a validator is mounted on the topic.
87
func (s *Subscriber[H]) Start(context.Context) (err error) {
88
log.Debugw("joining topic", "topic ID", s.pubsubTopicID)
- err = s.pubsub.RegisterTopicValidator(s.pubsubTopicID, s.verifyMessage)
89
+ err = s.pubsub.RegisterTopicValidator(s.pubsubTopicID, s.verifyMessage, pubsub.WithValidatorTimeout(time.Minute))
90
if err != nil {
91
return err
92
}
0 commit comments