update call Hooks #193

Merged
vtolstov merged 1 commits from devstigneev/micro-server-grpc:v3 into v3 2024-12-22 22:53:45 +03:00
2 changed files with 3 additions and 3 deletions

View File

@ -420,7 +420,7 @@ func (g *Server) processRequest(ctx context.Context, stream grpc.ServerStream, s
return err return err
} }
g.opts.Hooks.EachNext(func(hook options.Hook) { g.opts.Hooks.EachPrev(func(hook options.Hook) {
if h, ok := hook.(server.HookHandler); ok { if h, ok := hook.(server.HookHandler); ok {
fn = h(fn) fn = h(fn)
} }
@ -504,7 +504,7 @@ func (g *Server) processStream(ctx context.Context, stream grpc.ServerStream, se
return nil return nil
} }
opts.Hooks.EachNext(func(hook options.Hook) { opts.Hooks.EachPrev(func(hook options.Hook) {
if h, ok := hook.(server.HookHandler); ok { if h, ok := hook.(server.HookHandler); ok {
fn = h(fn) fn = h(fn)
} }

View File

@ -197,7 +197,7 @@ func (g *Server) createSubHandler(sb *subscriber, opts server.Options) broker.Ha
return nil return nil
} }
opts.Hooks.EachNext(func(hook options.Hook) { opts.Hooks.EachPrev(func(hook options.Hook) {
if h, ok := hook.(server.HookSubHandler); ok { if h, ok := hook.(server.HookSubHandler); ok {
fn = h(fn) fn = h(fn)
} }