correcting hooks calling
All checks were successful
lint / lint (pull_request) Successful in 1m2s
test / test (pull_request) Successful in 2m18s

This commit is contained in:
2024-12-17 15:35:04 +03:00
parent 19b04fe070
commit 58eec62419
8 changed files with 45 additions and 7 deletions

View File

@@ -109,7 +109,7 @@ func (m *memoryBroker) Init(opts ...broker.Option) error {
m.funcSubscribe = m.fnSubscribe
m.funcBatchSubscribe = m.fnBatchSubscribe
m.opts.Hooks.EachNext(func(hook options.Hook) {
m.opts.Hooks.EachPrev(func(hook options.Hook) {
switch h := hook.(type) {
case broker.HookPublish:
m.funcPublish = h(m.funcPublish)