mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-03 14:33:09 +00:00
fix: propagate relay subscribe opt properly (#829)
This commit is contained in:
parent
077df2fbb6
commit
a3c3aab44e
@ -24,6 +24,12 @@ func DontConsume() BroadcasterOption {
|
||||
}
|
||||
}
|
||||
|
||||
func WithConsumerOption(dontConsume bool) BroadcasterOption {
|
||||
return func(params *BroadcasterParameters) {
|
||||
params.dontConsume = dontConsume
|
||||
}
|
||||
}
|
||||
|
||||
// WithBufferSize option let's a user set channel buffer to be set.
|
||||
func WithBufferSize(size int) BroadcasterOption {
|
||||
return func(params *BroadcasterParameters) {
|
||||
|
||||
@ -339,7 +339,8 @@ func (w *WakuRelay) subscribe(ctx context.Context, contentFilter waku_proto.Cont
|
||||
}
|
||||
}
|
||||
|
||||
subscription := w.bcaster.Register(cFilter, WithBufferSize(DefaultRelaySubscriptionBufferSize))
|
||||
subscription := w.bcaster.Register(cFilter, WithBufferSize(DefaultRelaySubscriptionBufferSize),
|
||||
WithConsumerOption(params.dontConsume))
|
||||
|
||||
// Create Content subscription
|
||||
w.topicsMutex.RLock()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user