armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Derived context doesn't call parent context hooks

Open yzfeng2020 opened this issue 1 year ago • 0 comments

The current implementation for creating a new derived context doesn't seem to keep track of the hooks of parent context, so that the parent context hooks won't be called when ctx.push is called on the derived context.

https://github.com/line/armeria/blob/2219de19d510da43b7fc4afcabf730f8a4cca2ce/core/src/main/java/com/linecorp/armeria/internal/client/ClientUtil.java#L179

As suggested by @trustin, we could fix this by making sure a derived context keeps the reference to the parent context's hook list as well as its own hook list, so that both of them are invoked when the derived context needs to call hooks.

yzfeng2020 avatar Jun 19 '24 20:06 yzfeng2020