diff --git a/internal/pubsub/broker.go b/internal/pubsub/broker.go index d14877353819d4462f42d4e41997e92527843c98..2faf7f89b7c982950bfc69801a7901526e37eec4 100644 --- a/internal/pubsub/broker.go +++ b/internal/pubsub/broker.go @@ -20,12 +20,11 @@ func NewBroker[T any]() *Broker[T] { } func NewBrokerWithOptions[T any](channelBufferSize, maxEvents int) *Broker[T] { - b := &Broker[T]{ + return &Broker[T]{ subs: make(map[chan Event[T]]struct{}), done: make(chan struct{}), maxEvents: maxEvents, } - return b } func (b *Broker[T]) Shutdown() {