Skip to content

[Bug] The connection object returned by the redis instance call Conn() method loses the Hook #3267

Open
@ppanphper

Description

@ppanphper

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

  1. client = redis.NewClient(opts.Simple())
  2. client.AddHook(&CustomHook{redis: r})
  3. stickyConn := client.Conn()
  4. 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

Image

Image

Possible Implementation

Inherit the hook chain of the redis instance

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions