mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-12 22:07:47 +02:00
add the wrappers back into the core router
This commit is contained in:
@ -202,6 +202,11 @@ func (s *service) call(ctx context.Context, router *router, sending *sync.Mutex,
|
||||
return nil
|
||||
}
|
||||
|
||||
// wrap the handler
|
||||
for i := len(router.hdlrWrappers); i > 0; i-- {
|
||||
fn = router.hdlrWrappers[i-1](fn)
|
||||
}
|
||||
|
||||
// execute handler
|
||||
if err := fn(ctx, r, replyv.Interface()); err != nil {
|
||||
return err
|
||||
@ -235,6 +240,11 @@ func (s *service) call(ctx context.Context, router *router, sending *sync.Mutex,
|
||||
}
|
||||
}
|
||||
|
||||
// wrap the handler
|
||||
for i := len(router.hdlrWrappers); i > 0; i-- {
|
||||
fn = router.hdlrWrappers[i-1](fn)
|
||||
}
|
||||
|
||||
// client.Stream request
|
||||
r.stream = true
|
||||
|
||||
|
Reference in New Issue
Block a user