[Bug] The connection object returned by the redis instance call Conn() method loses the Hook
ppanphper opened this issue · 1 comments
ppanphper commented
Issue tracker is used for reporting bugs and discussing new features. Please use
stackoverflow for supporting issues.
Expected Behavior
trigger custom hook ProcessHook
Current Behavior
Unable to trigger custom hook ProcessHook
Possible Solution
Inherit the hook chain of the redis instance
Steps to Reproduce
- client = redis.NewClient(opts.Simple())
- client.AddHook(&CustomHook{redis: r})
- stickyConn := client.Conn()
- stickyConn.Get(ctx, "test").Err()
Context (Environment)
go 1.23
redis v9.6.1
Detailed Description
There is no hook chain that inherits the redis instance
Possible Implementation
Inherit the hook chain of the redis instance
ndyakov commented
Hello @ppanphper thank you for reaching out. I will review this and report back to you.
